Delete the PIN code only when the last session is deleted.
This commit is contained in:
parent
dae44ccab7
commit
eee53d8bbf
1 changed files with 4 additions and 3 deletions
|
|
@ -73,13 +73,14 @@ class DefaultLockScreenService(
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes sure to delete the pin code when the session is deleted.
|
* Makes sure to delete the pin code when the last session is deleted.
|
||||||
*/
|
*/
|
||||||
private fun observeSessionsState() {
|
private fun observeSessionsState() {
|
||||||
sessionObserver.addListener(object : SessionListener {
|
sessionObserver.addListener(object : SessionListener {
|
||||||
override suspend fun onSessionDeleted(userId: String, wasLastSession: Boolean) {
|
override suspend fun onSessionDeleted(userId: String, wasLastSession: Boolean) {
|
||||||
// TODO handle multi session at some point
|
if (wasLastSession) {
|
||||||
pinCodeManager.deletePinCode()
|
pinCodeManager.deletePinCode()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue