mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2024-12-28 09:11:44 +01:00
make sure we call getLatestMediaId from a background thread
This commit is contained in:
parent
67be9efbe3
commit
1c433b1ebf
@ -526,9 +526,11 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||
}
|
||||
|
||||
private fun gotDirectories(newDirs: ArrayList<Directory>, isFromCache: Boolean) {
|
||||
val dirs = getSortedDirectories(newDirs)
|
||||
Thread {
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
}.start()
|
||||
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
val dirs = getSortedDirectories(newDirs)
|
||||
directories_refresh_layout.isRefreshing = false
|
||||
mIsGettingDirs = false
|
||||
|
||||
|
@ -537,7 +537,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||
}
|
||||
|
||||
private fun gotMedia(media: ArrayList<Medium>, isFromCache: Boolean = false) {
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
Thread {
|
||||
mLatestMediaId = getLatestMediaId()
|
||||
}.start()
|
||||
|
||||
mIsGettingMedia = false
|
||||
media_refresh_layout.isRefreshing = false
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user