diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt index 49a0e47d6..c09b7604e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -292,7 +292,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } fun updateMedia(newMedia: ArrayList) { - if (newMedia.hashCode() != currentMediaHash || currentGrouping != getCurrentFolderGrouping()) { + if (newMedia.hashCode() != currentMediaHash || currentGrouping != getFolderGrouping()) { currentMediaHash = newMedia.hashCode() Handler().postDelayed({ media = newMedia @@ -334,7 +334,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } private fun groupMedia() { - currentGrouping = getCurrentFolderGrouping() + currentGrouping = getFolderGrouping() if (currentGrouping and GROUP_BY_NONE != 0) { return } @@ -355,7 +355,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } } - private fun getCurrentFolderGrouping() = activity.config.getFolderGrouping(path) + private fun getFolderGrouping() = activity.config.getFolderGrouping(path) private fun setupView(view: View, medium: Medium) { view.apply {