From 86e3cdbe8c56ba0b9331ac887fa00fd52385dbf3 Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Tue, 3 Nov 2026 12:36:08 +0000 Subject: [PATCH] android: fix the Invest banner showing briefly at start outside the US (#8013) * android: fix the Invest banner showing briefly at start outside the US * android: show the Invest banner's country condition at its call sites * android: chat list docs say the Invest banner waits for the Play country * android: chat list spec says the Invest banner condition's order matters * android: docs map the Invest banner's conditions and note What's New's * android: show crowdfunding in Play builds only once the country is known --------- Co-authored-by: spacedandy-agents-simplex <342056592+spacedandy-agents-simplex@users.noreply.github.com> --- .../kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt | 2 +- apps/multiplatform/spec/client/chat-list.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt index e1d257783a..e54e918f77 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/onboarding/WhatsNewView.kt @@ -1119,7 +1119,7 @@ fun crowdfundingAvailable(): Boolean { if (androidPlayStoreCountry.value == null) platform.androidLoadPlayStoreCountry() } } - return isInUs() + return androidPlayStoreCountry.value != null && isInUs() } fun isInUs(): Boolean = diff --git a/apps/multiplatform/spec/client/chat-list.md b/apps/multiplatform/spec/client/chat-list.md index f9df6ff5df..b655397b0c 100644 --- a/apps/multiplatform/spec/client/chat-list.md +++ b/apps/multiplatform/spec/client/chat-list.md @@ -330,7 +330,7 @@ Uses `AnimatedViewState` (`GONE`, `VISIBLE`, `HIDING`) with a `MutableStateFlow` fun GetStakeBanner(showDismiss: Boolean, onTap: () -> Unit, onDismiss: () -> Unit) ``` -Gradient card inviting the user to invest on Wefunder. Shown only when `crowdfundingAvailable()` — always outside Play Store builds, and in Play builds only while the store country is the US or not yet known — and only while `getStakeBannerDismissed` is false. +Gradient card inviting the user to invest on Wefunder. Shown only when `crowdfundingAvailable()` — always outside Play Store builds, and in Play builds only once the store country is known and is the US (or empty) — and only while `getStakeBannerDismissed` is false. ### Placement