mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
show the numeric sorting checkbox only at sorting by name or path
This commit is contained in:
parent
4812dff077
commit
dcfca72064
1 changed files with 4 additions and 1 deletions
|
@ -25,7 +25,7 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorti
|
|||
view = activity.layoutInflater.inflate(R.layout.dialog_change_sorting, null).apply {
|
||||
use_for_this_folder_divider.beVisibleIf(showFolderCheckbox)
|
||||
|
||||
sorting_dialog_numeric_sorting.beVisibleIf(showFolderCheckbox)
|
||||
sorting_dialog_numeric_sorting.beVisibleIf(showFolderCheckbox && (currSorting and SORT_BY_NAME != 0 || currSorting and SORT_BY_PATH != 0))
|
||||
sorting_dialog_numeric_sorting.isChecked = currSorting and SORT_USE_NUMERIC_VALUE != 0
|
||||
|
||||
sorting_dialog_use_for_this_folder.beVisibleIf(showFolderCheckbox)
|
||||
|
@ -46,6 +46,9 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorti
|
|||
|
||||
private fun setupSortRadio() {
|
||||
val sortingRadio = view.sorting_dialog_radio_sorting
|
||||
sortingRadio.setOnCheckedChangeListener { group, checkedId ->
|
||||
view.sorting_dialog_numeric_sorting.beVisibleIf(checkedId == sortingRadio.sorting_dialog_radio_name.id || checkedId == sortingRadio.sorting_dialog_radio_path.id)
|
||||
}
|
||||
|
||||
val sortBtn = when {
|
||||
currSorting and SORT_BY_PATH != 0 -> sortingRadio.sorting_dialog_radio_path
|
||||
|
|
Loading…
Reference in a new issue