From 4959a11ca948057ff72dfc49b49ce0f47cbd2382 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 17 Apr 2017 21:33:23 +0200 Subject: [PATCH] clear actMode of adapters on destroy --- .../com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt | 1 + .../com/simplemobiletools/gallery/adapters/MediaAdapter.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 6fa0c8f3b..24fa047bc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -113,6 +113,7 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList) { 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 8cd2eaa23..609228e7c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -100,6 +100,7 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList, super.onDestroyActionMode(actionMode) views.forEach { toggleItemSelection(it, false) } markedItems.clear() + actMode = null } }