mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
recheck scroll direction on resume
This commit is contained in:
parent
f2b1ef2c3b
commit
52c636f176
3 changed files with 8 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue