From 5d756b5a60f5bd72dc585b821f46d43e318e2eea Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Apr 2018 10:34:21 +0200 Subject: [PATCH] change the way allowBubbleDisplay is set on resume --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 4 +++- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 55a9aee4f..8c988eec6 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -122,7 +122,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { getRecyclerAdapter()?.updateShowMediaCount(config.showMediaCount) } - if (mStoredScrollHorizontally != config.scrollHorizontally || mStoredShowInfoBubble != config.showInfoBubble) { + if (mStoredScrollHorizontally != config.scrollHorizontally) { getRecyclerAdapter()?.updateScrollHorizontally(config.viewTypeFolders != VIEW_TYPE_LIST && config.scrollHorizontally) setupScrollDirection() } @@ -139,6 +139,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { directories_horizontal_fastscroller.updateBubbleColors() directories_vertical_fastscroller.updateBubbleColors() + directories_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble + directories_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble directories_refresh_layout.isEnabled = config.enablePullToRefresh invalidateOptionsMenu() directories_empty_text_label.setTextColor(config.textColor) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index c5357e42f..4bc667bc5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -120,7 +120,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { getMediaAdapter()?.updateCropThumbnails(config.cropThumbnails) } - if (mStoredScrollHorizontally != config.scrollHorizontally || mStoredShowInfoBubble != config.showInfoBubble) { + if (mStoredScrollHorizontally != config.scrollHorizontally) { getMediaAdapter()?.updateScrollHorizontally(config.viewTypeFiles != VIEW_TYPE_LIST || !config.scrollHorizontally) setupScrollDirection() } @@ -137,6 +137,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { media_horizontal_fastscroller.updateBubbleColors() media_vertical_fastscroller.updateBubbleColors() + media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble + media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble media_refresh_layout.isEnabled = config.enablePullToRefresh tryloadGallery() invalidateOptionsMenu()