Skip to content
Snippets Groups Projects
Commit 4c9e2e27 authored by Duncan McNamara's avatar Duncan McNamara Committed by Nicolas Pomepuy
Browse files

SafeMode: remove relock button when disabled

If the safe mode is unlocked, and then in the settings, disabled, the
"re-lock" button would still stay visible. This removes it, if the
setting is changed.
parent 7d46b230
No related branches found
No related tags found
1 merge request!1946SafeMode: remove relock button when disabled
Pipeline #499466 passed with stage
in 7 minutes and 18 seconds
......@@ -98,7 +98,7 @@ abstract class BaseActivity : AppCompatActivity() {
override fun onPrepareOptionsMenu(menu: Menu?): Boolean {
val relockItem = menu?.findItem(R.id.pin_relocked)
if (relockItem != null) {
relockItem.isVisible = PinCodeDelegate.pinUnlocked.value == true
relockItem.isVisible = Settings.safeMode && PinCodeDelegate.pinUnlocked.value == true
}
val unlockItem = menu?.findItem(R.id.pin_unlock)
if (unlockItem != null) {
......
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