Skip to content
Snippets Groups Projects
Commit dfd046f6 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Close the permission dialog activity when the user chooses to cancel it

Fixes #2432
parent b627c50f
No related branches found
No related tags found
1 merge request!1294Close the permission dialog activity when the user chooses to cancel it
Pipeline #199969 passed with stage
in 3 minutes and 45 seconds
......@@ -190,7 +190,10 @@ object Permissions {
.setIcon(R.drawable.ic_warning)
.setPositiveButton(activity.getString(R.string.ok)) { _, _ ->
listener.invoke(true)
}.setNegativeButton(activity.getString(R.string.cancel)) { _, _ -> listener.invoke(false) }
}.setNegativeButton(activity.getString(R.string.cancel)) { _, _ ->
activity.finish()
listener.invoke(false)
}
.setCancelable(false)
return dialogBuilder.show().apply {
if (activity is AppCompatActivity) activity.lifecycle.addObserver(object : LifecycleObserver {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment