speed up checking if directories or images changed
This commit is contained in:
parent
9a7361795f
commit
77e32c2790
2 changed files with 5 additions and 4 deletions
|
@ -297,9 +297,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
fun gotDirectories(dirs: ArrayList<Directory>) {
|
||||
directories_holder.isRefreshing = false
|
||||
mIsGettingDirs = false
|
||||
if (dirs == mDirs) {
|
||||
|
||||
if (dirs.hashCode() == mDirs.hashCode())
|
||||
return
|
||||
}
|
||||
|
||||
mDirs = dirs
|
||||
|
||||
setupAdapter()
|
||||
|
|
|
@ -285,9 +285,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
fun gotMedia(media: ArrayList<Medium>) {
|
||||
mIsGettingMedia = false
|
||||
media_holder.isRefreshing = false
|
||||
if (media == mMedia) {
|
||||
|
||||
if (media.hashCode() == mMedia.hashCode())
|
||||
return
|
||||
}
|
||||
|
||||
mMedia = media
|
||||
initializeGallery()
|
||||
|
|
Loading…
Reference in a new issue