From 9272fbc3a303fcb286a10580e52e7f3e4fde3544 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 24 May 2017 21:17:23 +0200 Subject: [PATCH] make some variables in ChangeSortingDialog private --- .../gallery/dialogs/ChangeSortingDialog.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 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 c273a4ab3..f6516ee9b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/ChangeSortingDialog.kt @@ -16,15 +16,11 @@ import kotlinx.android.synthetic.main.dialog_change_sorting.view.* class ChangeSortingDialog(val activity: SimpleActivity, val isDirectorySorting: Boolean, showFolderCheckbox: Boolean, val path: String = "", val callback: () -> Unit) : DialogInterface.OnClickListener { - companion object { - private var currSorting = 0 - - lateinit var config: Config - lateinit var view: View - } + private var currSorting = 0 + private var config: Config = activity.config + private var view: View init { - config = activity.config 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)