mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
store latestMediaId only when not from cache, should improve new media discovery
This commit is contained in:
parent
58e44786a9
commit
c930ed5cda
1 changed files with 5 additions and 3 deletions
|
@ -527,9 +527,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
}
|
||||
|
||||
private fun gotDirectories(newDirs: ArrayList<Directory>, isFromCache: Boolean) {
|
||||
Thread {
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
}.start()
|
||||
if (!isFromCache) {
|
||||
Thread {
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
}.start()
|
||||
}
|
||||
|
||||
val dirs = getSortedDirectories(newDirs)
|
||||
directories_refresh_layout.isRefreshing = false
|
||||
|
|
Loading…
Reference in a new issue