mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
make sure we are updating media from the ui htread
This commit is contained in:
parent
37610e8980
commit
b21305cb4b
1 changed files with 3 additions and 1 deletions
|
@ -924,7 +924,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
private fun handleDeletion(fileDirItem: FileDirItem, deleteFromDatabase: Boolean) {
|
||||
mIgnoredPaths.add(fileDirItem.path)
|
||||
val media = mMediaFiles.filter { !mIgnoredPaths.contains(it.path) } as ArrayList<ThumbnailItem>
|
||||
runOnUiThread {
|
||||
gotMedia(media)
|
||||
}
|
||||
tryDeleteFileDirItem(fileDirItem, false, deleteFromDatabase) {
|
||||
mIgnoredPaths.remove(fileDirItem.path)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue