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 7b01d358a..2daac0178 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -119,6 +119,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { if (mStoredScrollHorizontally != config.scrollHorizontally) { (directories_grid.adapter as DirectoryAdapter).scrollVertically = !config.scrollHorizontally directories_grid.adapter.notifyDataSetChanged() + setupScrollDirection() } tryloadGallery() @@ -396,7 +397,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { itemClicked(it.path) } } + setupScrollDirection() + } + private fun setupScrollDirection() { directories_vertical_fastscroller.isHorizontal = false directories_vertical_fastscroller.beGoneIf(config.scrollHorizontally) 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 7fa039bbf..a88097494 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -89,6 +89,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { if (mStoredScrollHorizontally != config.scrollHorizontally) { (media_grid.adapter as MediaAdapter).scrollVertically = !config.scrollHorizontally media_grid.adapter.notifyDataSetChanged() + setupScrollDirection() } tryloadGallery() @@ -145,7 +146,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { itemClicked(it.path) } } + setupScrollDirection() + } + private fun setupScrollDirection() { media_vertical_fastscroller.isHorizontal = false media_vertical_fastscroller.beGoneIf(config.scrollHorizontally) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt index 53db0c197..8d334b11d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt @@ -10,7 +10,6 @@ import com.simplemobiletools.commons.helpers.* import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.activities.SimpleActivity import com.simplemobiletools.gallery.extensions.config -import com.simplemobiletools.gallery.helpers.Config import kotlinx.android.synthetic.main.dialog_change_sorting.view.* class ChangeSortingDialog(val activity: SimpleActivity, val isDirectorySorting: Boolean, showFolderCheckbox: Boolean,