From e7aeb4425601e9cd2bfc360f4b135077a7c442e6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 30 Nov 2017 10:37:51 +0100 Subject: [PATCH] small cleanup at the sorting dialog --- .../gallery/dialogs/ChangeSortingDialog.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 0af86fd6a..5ea179dad 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt @@ -40,13 +40,13 @@ class ChangeSortingDialog(val activity: BaseSimpleActivity, val isDirectorySorti private fun setupSortRadio() { val sortingRadio = view.sorting_dialog_radio_sorting - var sortBtn = sortingRadio.sorting_dialog_radio_name - when { - currSorting and SORT_BY_PATH != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_path - currSorting and SORT_BY_SIZE != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_size - currSorting and SORT_BY_DATE_MODIFIED != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_last_modified - currSorting and SORT_BY_DATE_TAKEN != 0 -> sortBtn = sortingRadio.sorting_dialog_radio_date_taken + val sortBtn = when { + currSorting and SORT_BY_PATH != 0 -> sortingRadio.sorting_dialog_radio_path + currSorting and SORT_BY_SIZE != 0 -> sortingRadio.sorting_dialog_radio_size + currSorting and SORT_BY_DATE_MODIFIED != 0 -> sortingRadio.sorting_dialog_radio_last_modified + currSorting and SORT_BY_DATE_TAKEN != 0 -> sortingRadio.sorting_dialog_radio_date_taken + else -> sortingRadio.sorting_dialog_radio_name } sortBtn.isChecked = true }