mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Delete unencrypted files each time the app is started
This commit is contained in:
parent
e4968c4119
commit
0956baecf9
1 changed files with 6 additions and 0 deletions
|
@ -71,12 +71,18 @@ class HomeActivityViewModel @AssistedInject constructor(
|
|||
private var onceTrusted = false
|
||||
|
||||
init {
|
||||
cleanupFiles()
|
||||
observeInitialSync()
|
||||
mayBeInitializeCrossSigning()
|
||||
checkSessionPushIsOn()
|
||||
observeCrossSigningReset()
|
||||
}
|
||||
|
||||
private fun cleanupFiles() {
|
||||
// Mitigation: delete all cached decrypted files each time the application is started.
|
||||
activeSessionHolder.getSafeActiveSession()?.fileService()?.clearDecryptedCache()
|
||||
}
|
||||
|
||||
private fun observeCrossSigningReset() {
|
||||
val safeActiveSession = activeSessionHolder.getSafeActiveSession() ?: return
|
||||
|
||||
|
|
Loading…
Reference in a new issue