android, desktop: show What's new once while conditions are pending (#8123)

* android, desktop: show What's new once while conditions are pending

* core: document how changed conditions are announced
This commit is contained in:
Evgeny @ SimpleX Chat authored and GitHub committed 2026-11-11 11:44:59 +00:00
1 parent 3b5152d6ed
commit 2205de390f
2 files changed
+7

No files matched your search

@@ -239,12 +239,14 @@ fun ChatListView(chatModel: ChatModel, userPickerState: MutableStateFlow<Animate
val oneHandUI = remember { appPrefs.oneHandUI.state }
LaunchedEffect(Unit) {
if (noticesShown) return@LaunchedEffect
val showWhatsNew = shouldShowWhatsNew(chatModel)
val showUpdatedConditions = chatModel.conditions.value.conditionsAction?.shouldShowNotice ?: false
if (showWhatsNew || showUpdatedConditions) {
// Requested here, so that the country is known by the time the modal opens
platform.androidLoadPlayStoreCountry()
delay(1000L)
noticesShown = true
ModalManager.center.showCustomModal { close -> WhatsNewView(close = close, updatedConditions = showUpdatedConditions) }
}
}
@@ -956,6 +958,7 @@ private fun ErrorSettingsView() {
}
private var lazyListState = 0 to 0
private var noticesShown = false
enum class ScrollDirection {
Up, Down, Idle
+4
View File
@@ -59,6 +59,10 @@ import Simplex.Messaging.Protocol (AProtocolType (..), ProtoServerWithAuth (..),
import Simplex.Messaging.Transport.Client (TransportHost (..))
import Simplex.Messaging.Util (atomicModifyIORef'_, safeDecodeUtf8)
-- Change the conditions only in a release whose What's new announces the change:
-- the apps show changed conditions as a link in What's new, also in a release without other news.
-- The notice is recorded when What's new is shown, and the conditions are accepted automatically
-- 31 days later, if the notice was shown within 14 days after the app added the conditions to the database.
usageConditionsCommit :: Text
usageConditionsCommit = "5cb85b913989aa4dc618a0a47ffb9a758e44f375"