change the way allowBubbleDisplay is set on resume

This commit is contained in:
tibbi 2018-04-24 10:34:21 +02:00
parent e2fe74ea33
commit 5d756b5a60
2 changed files with 6 additions and 2 deletions

View file

@ -122,7 +122,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
getRecyclerAdapter()?.updateShowMediaCount(config.showMediaCount) getRecyclerAdapter()?.updateShowMediaCount(config.showMediaCount)
} }
if (mStoredScrollHorizontally != config.scrollHorizontally || mStoredShowInfoBubble != config.showInfoBubble) { if (mStoredScrollHorizontally != config.scrollHorizontally) {
getRecyclerAdapter()?.updateScrollHorizontally(config.viewTypeFolders != VIEW_TYPE_LIST && config.scrollHorizontally) getRecyclerAdapter()?.updateScrollHorizontally(config.viewTypeFolders != VIEW_TYPE_LIST && config.scrollHorizontally)
setupScrollDirection() setupScrollDirection()
} }
@ -139,6 +139,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
directories_horizontal_fastscroller.updateBubbleColors() directories_horizontal_fastscroller.updateBubbleColors()
directories_vertical_fastscroller.updateBubbleColors() directories_vertical_fastscroller.updateBubbleColors()
directories_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
directories_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
directories_refresh_layout.isEnabled = config.enablePullToRefresh directories_refresh_layout.isEnabled = config.enablePullToRefresh
invalidateOptionsMenu() invalidateOptionsMenu()
directories_empty_text_label.setTextColor(config.textColor) directories_empty_text_label.setTextColor(config.textColor)

View file

@ -120,7 +120,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
getMediaAdapter()?.updateCropThumbnails(config.cropThumbnails) getMediaAdapter()?.updateCropThumbnails(config.cropThumbnails)
} }
if (mStoredScrollHorizontally != config.scrollHorizontally || mStoredShowInfoBubble != config.showInfoBubble) { if (mStoredScrollHorizontally != config.scrollHorizontally) {
getMediaAdapter()?.updateScrollHorizontally(config.viewTypeFiles != VIEW_TYPE_LIST || !config.scrollHorizontally) getMediaAdapter()?.updateScrollHorizontally(config.viewTypeFiles != VIEW_TYPE_LIST || !config.scrollHorizontally)
setupScrollDirection() setupScrollDirection()
} }
@ -137,6 +137,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
media_horizontal_fastscroller.updateBubbleColors() media_horizontal_fastscroller.updateBubbleColors()
media_vertical_fastscroller.updateBubbleColors() media_vertical_fastscroller.updateBubbleColors()
media_horizontal_fastscroller.allowBubbleDisplay = config.showInfoBubble
media_vertical_fastscroller.allowBubbleDisplay = config.showInfoBubble
media_refresh_layout.isEnabled = config.enablePullToRefresh media_refresh_layout.isEnabled = config.enablePullToRefresh
tryloadGallery() tryloadGallery()
invalidateOptionsMenu() invalidateOptionsMenu()