From 9bfb83dba24e4a11864854fbef7a210de1001fc4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 22 Jun 2018 10:03:02 +0200 Subject: [PATCH] removing a helper function --- .../com/simplemobiletools/gallery/adapters/MediaAdapter.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 c09b7604e..53a4ca619 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 != getFolderGrouping()) { + if (newMedia.hashCode() != currentMediaHash || currentGrouping != config.getFolderGrouping(path)) { currentMediaHash = newMedia.hashCode() Handler().postDelayed({ media = newMedia @@ -334,7 +334,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } private fun groupMedia() { - currentGrouping = getFolderGrouping() + currentGrouping = config.getFolderGrouping(path) if (currentGrouping and GROUP_BY_NONE != 0) { return } @@ -355,8 +355,6 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, } } - private fun getFolderGrouping() = activity.config.getFolderGrouping(path) - private fun setupView(view: View, medium: Medium) { view.apply { play_outline.beVisibleIf(medium.isVideo())