From 8cf0e9d7d492be907a088cd6ce4683cd5efaa0f8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 22 Jun 2018 13:18:57 +0200 Subject: [PATCH] clear mediumGroups before refilling it --- .../com/simplemobiletools/gallery/adapters/MediaAdapter.kt | 1 + 1 file changed, 1 insertion(+) 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 10dce565f..ef03e9aa0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -376,6 +376,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, return } + mediumGroups.clear() media.forEach { val key = it.getGroupingKey(currentGrouping) if (!mediumGroups.containsKey(key)) {