mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
fixing a glitch with missing thumbnails at random sorting
This commit is contained in:
parent
8cd32928aa
commit
8c47d9e5ba
1 changed files with 5 additions and 1 deletions
|
@ -57,6 +57,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
private var mShowAll = false
|
private var mShowAll = false
|
||||||
private var mLoadedInitialPhotos = false
|
private var mLoadedInitialPhotos = false
|
||||||
private var mIsSearchOpen = false
|
private var mIsSearchOpen = false
|
||||||
|
private var mWasFullscreenViewOpen = false
|
||||||
private var mLastSearchedText = ""
|
private var mLastSearchedText = ""
|
||||||
private var mLatestMediaId = 0L
|
private var mLatestMediaId = 0L
|
||||||
private var mLatestMediaDateId = 0L
|
private var mLatestMediaDateId = 0L
|
||||||
|
@ -171,7 +172,9 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mMedia.isEmpty() || config.getFolderSorting(mPath) and SORT_BY_RANDOM == 0) {
|
// do not refresh Random sorted files after opening a fullscreen image and going Back
|
||||||
|
val isRandomSorting = config.getFolderSorting(mPath) and SORT_BY_RANDOM != 0
|
||||||
|
if (mMedia.isEmpty() || !isRandomSorting || (isRandomSorting && !mWasFullscreenViewOpen)) {
|
||||||
if (shouldSkipAuthentication()) {
|
if (shouldSkipAuthentication()) {
|
||||||
tryLoadGallery()
|
tryLoadGallery()
|
||||||
} else {
|
} else {
|
||||||
|
@ -804,6 +807,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
}
|
}
|
||||||
finish()
|
finish()
|
||||||
} else {
|
} else {
|
||||||
|
mWasFullscreenViewOpen = true
|
||||||
val isVideo = path.isVideoFast()
|
val isVideo = path.isVideoFast()
|
||||||
if (isVideo) {
|
if (isVideo) {
|
||||||
val extras = HashMap<String, Boolean>()
|
val extras = HashMap<String, Boolean>()
|
||||||
|
|
Loading…
Reference in a new issue