android, desktop: self destruct becomes better (#3598)

* android, desktop: self destruct becomes better

* better way of doing it

* fix script

* firstOrNull

* changes for review

* comment

---------

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
Stanislav Dmitrenko
2023-12-29 17:47:25 +00:00
committed by GitHub
co-authored by Evgeny Poberezkin
parent 05b55d3fb5
commit 1438fd00e2
17 changed files with 188 additions and 88 deletions
@@ -63,10 +63,7 @@ class SimplexApp: Application(), LifecycleEventObserver {
tmpDir.deleteRecursively()
tmpDir.mkdir()
withBGApi {
initChatController()
runMigrations()
}
initChatControllerAndRunMigrations(false)
ProcessLifecycleOwner.get().lifecycle.addObserver(this@SimplexApp)
}