core: faster tracking of active subscriptions; ui: only track in foreground (#4446)

* core: faster tracking of active subscriptions

* combine db transaction

* optimizations of queries from UI

* ios: track when active

* ios: disable log

---------

Co-authored-by: Avently <7953703+avently@users.noreply.github.com>
Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
This commit is contained in:
Evgeny Poberezkin
2024-07-13 08:44:51 +01:00
committed by GitHub
parent 23f24b1677
commit 3e873fcb32
8 changed files with 47 additions and 95 deletions
@@ -1,6 +1,7 @@
package chat.simplex.common.platform
import chat.simplex.common.model.*
import chat.simplex.common.simplexWindowState
import chat.simplex.common.views.call.RcvCallInvitation
import chat.simplex.common.views.helpers.*
import java.util.*
@@ -10,6 +11,8 @@ actual val appPlatform = AppPlatform.DESKTOP
actual val deviceName = generalGetString(MR.strings.desktop_device)
actual fun isAppVisibleAndFocused() = simplexWindowState.windowFocused.value
@Suppress("ConstantLocale")
val defaultLocale: Locale = Locale.getDefault()