clear data on context change

This commit is contained in:
Adam Velebil 2024-03-01 10:17:50 +01:00
parent 87c28e3328
commit 47e207fe1a
No known key found for this signature in database
GPG Key ID: C9B1E4A3CBBD2E10
2 changed files with 4 additions and 0 deletions

View File

@ -150,6 +150,8 @@ class FidoManager(
super.dispose()
deviceManager.removeDeviceListener(this)
fidoChannel.setMethodCallHandler(null)
fidoViewModel.setSessionState(null)
fidoViewModel.updateCredentials(listOf())
coroutineScope.cancel()
}

View File

@ -214,6 +214,8 @@ class OathManager(
deviceManager.removeDeviceListener(this)
oathViewModel.credentials.removeObserver(credentialObserver)
oathChannel.setMethodCallHandler(null)
oathViewModel.setSessionState(null)
oathViewModel.updateCredentials(mapOf())
coroutineScope.cancel()
}