From 95ff1b1b9516c13325c7b249980bb17f06d2093b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 11 Mar 2017 11:14:54 +0100 Subject: [PATCH] using an Apply at sorting dialog --- .../gallery/dialogs/ChangeSortingDialog.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 fee14edbb..f28d3b2c2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt @@ -24,10 +24,11 @@ class ChangeSortingDialog(val activity: SimpleActivity, val isDirectorySorting: init { config = activity.config - view = LayoutInflater.from(activity).inflate(R.layout.dialog_change_sorting, null) - view.use_for_this_folder_divider.beVisibleIf(showFolderCheckbox) - view.sorting_dialog_use_for_this_folder.beVisibleIf(showFolderCheckbox) - view.sorting_dialog_use_for_this_folder.isChecked = config.hasCustomSorting(path) + view = LayoutInflater.from(activity).inflate(R.layout.dialog_change_sorting, null).apply { + use_for_this_folder_divider.beVisibleIf(showFolderCheckbox) + sorting_dialog_use_for_this_folder.beVisibleIf(showFolderCheckbox) + sorting_dialog_use_for_this_folder.isChecked = config.hasCustomSorting(path) + } AlertDialog.Builder(activity) .setPositiveButton(R.string.ok, this)