mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Delete the PIN code only when the last session is deleted.
This commit is contained in:
committed by
Benoit Marty
parent
7777607a37
commit
0284fd22e8
+4
-3
@@ -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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user