mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
fix a glitch at determining if proper date taken and last modified should be fetched
This commit is contained in:
parent
aeb45a1a22
commit
8a26a6c272
1 changed files with 4 additions and 8 deletions
|
@ -892,8 +892,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
val includedFolders = config.includedFolders
|
||||
val tempFolderPath = config.tempFolderPath
|
||||
val isSortingAscending = config.directorySorting and SORT_DESCENDING == 0
|
||||
val getProperDateTaken = config.directorySorting and SORT_BY_DATE_TAKEN != 0
|
||||
var getProperLastModified = config.directorySorting and SORT_BY_DATE_MODIFIED != 0
|
||||
val getProperFileSize = config.directorySorting and SORT_BY_SIZE != 0
|
||||
val favoritePaths = getFavoritePaths()
|
||||
val dirPathsToRemove = ArrayList<String>()
|
||||
|
@ -904,9 +902,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
return
|
||||
}
|
||||
|
||||
if (!getProperLastModified) {
|
||||
getProperLastModified = config.getFileSorting(directory.path) and SORT_BY_DATE_MODIFIED != 0
|
||||
}
|
||||
val getProperDateTaken = config.directorySorting and SORT_BY_DATE_TAKEN != 0 || config.getFileSorting(directory.path) and SORT_BY_DATE_TAKEN != 0
|
||||
val getProperLastModified = config.directorySorting and SORT_BY_DATE_MODIFIED != 0 || config.getFileSorting(directory.path) and SORT_BY_DATE_MODIFIED != 0
|
||||
|
||||
val curMedia = mLastMediaFetcher!!.getFilesFrom(directory.path, getImagesOnly, getVideosOnly, getProperDateTaken, getProperLastModified, getProperFileSize, favoritePaths, false)
|
||||
val newDir = if (curMedia.isEmpty()) {
|
||||
|
@ -982,9 +979,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
return
|
||||
}
|
||||
|
||||
if (!getProperLastModified) {
|
||||
getProperLastModified = config.getFileSorting(folder) and SORT_BY_DATE_MODIFIED != 0
|
||||
}
|
||||
val getProperDateTaken = config.directorySorting and SORT_BY_DATE_TAKEN != 0 || config.getFileSorting(folder) and SORT_BY_DATE_TAKEN != 0
|
||||
val getProperLastModified = config.directorySorting and SORT_BY_DATE_MODIFIED != 0 || config.getFileSorting(folder) and SORT_BY_DATE_MODIFIED != 0
|
||||
|
||||
val newMedia = mLastMediaFetcher!!.getFilesFrom(folder, getImagesOnly, getVideosOnly, getProperDateTaken, getProperLastModified, getProperFileSize, favoritePaths, false)
|
||||
if (newMedia.isEmpty()) {
|
||||
|
|
Loading…
Reference in a new issue