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 DmitrenkoandEvgeny Poberezkin authored and GitHub committed 2023-12-29 17:47:25 +00:00
1 parent 05b55d3fb5
commit 1438fd00e2
17 files changed
+188 -88

No files matched your search

@@ -63,10 +63,7 @@ class SimplexApp: Application(), LifecycleEventObserver {
tmpDir.deleteRecursively()
tmpDir.mkdir()
withBGApi {
initChatController()
runMigrations()
}
initChatControllerAndRunMigrations(false)
ProcessLifecycleOwner.get().lifecycle.addObserver(this@SimplexApp)
}