1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 06:37:30 +00:00

Fix dialog root

This commit is contained in:
Ammar Githam 2021-07-13 23:40:10 +09:00
parent 76acaafe32
commit f59e2b900b

View File

@ -30,17 +30,17 @@ class PostsLayoutPreferencesDialogFragment(
} }
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
binding = DialogPostLayoutPreferencesBinding.inflate(layoutInflater, null, false) binding = DialogPostLayoutPreferencesBinding.inflate(layoutInflater)
init() init()
return MaterialAlertDialogBuilder(requireContext()).apply { return MaterialAlertDialogBuilder(requireContext())
setView(binding.root) .setView(binding.getRoot())
setPositiveButton(R.string.apply) { _: DialogInterface?, _: Int -> .setPositiveButton(R.string.apply) { _: DialogInterface?, _: Int ->
val preferences = preferencesBuilder.build() val preferences = preferencesBuilder.build()
val json = preferences.json val json = preferences.json
Utils.settingsHelper.putString(layoutPreferenceKey, json) Utils.settingsHelper.putString(layoutPreferenceKey, json)
onApplyListener.onApply(preferences) onApplyListener.onApply(preferences)
} }
}.create() .create()
} }
private fun init() { private fun init() {