mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
update UI at picker dialogs from the main thread
This commit is contained in:
@ -42,7 +42,9 @@ class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: Stri
|
||||
|
||||
activity.getCachedDirectories {
|
||||
if (it.isNotEmpty()) {
|
||||
gotDirectories(activity.addTempFolderIfNeeded(it))
|
||||
activity.runOnUiThread {
|
||||
gotDirectories(activity.addTempFolderIfNeeded(it))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,9 @@ class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val c
|
||||
activity.getCachedMedia(path) {
|
||||
val media = it.filter { !it.isVideo() } as ArrayList
|
||||
if (media.isNotEmpty()) {
|
||||
gotMedia(media)
|
||||
activity.runOnUiThread {
|
||||
gotMedia(media)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user