mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-21 21:10:15 +00:00
Merge branch 'stable'
This commit is contained in:
@@ -42,7 +42,10 @@ private struct FeatureView {
|
||||
let view: () -> any View
|
||||
}
|
||||
|
||||
let isInUS = SKStorefront().countryCode == "USA"
|
||||
let isInUS = {
|
||||
let code = SKStorefront().countryCode
|
||||
return code == "USA" || code == ""
|
||||
}()
|
||||
|
||||
private let versionDescriptions: [VersionDescription] = [
|
||||
VersionDescription(
|
||||
@@ -668,7 +671,7 @@ private let versionDescriptions: [VersionDescription] = [
|
||||
]
|
||||
),
|
||||
VersionDescription(
|
||||
version: "v7.0 ",
|
||||
version: isInUS ? "v7.0.1" : "v7.0",
|
||||
post: nil,
|
||||
features: (isInUS ? [
|
||||
.view(FeatureView(
|
||||
|
||||
+11
-4
@@ -943,7 +943,7 @@ private val versionDescriptions: List<VersionDescription> = listOf(
|
||||
),
|
||||
VersionDescription(
|
||||
// the trailing space differs from the previously released "v7.0", so that What's new is shown again
|
||||
version = "v7.0 ",
|
||||
version = if (isInUs()) "v7.0.1" else "v7.0",
|
||||
post = null,
|
||||
features = listOf(
|
||||
VersionFeature.FeatureView(
|
||||
@@ -1024,12 +1024,19 @@ else
|
||||
@Composable
|
||||
fun crowdfundingAvailable(): Boolean {
|
||||
if (!platform.androidIsPlayStoreBuild) return true
|
||||
LaunchedEffect(Unit) {
|
||||
if (androidPlayStoreCountry.value == null) platform.androidLoadPlayStoreCountry()
|
||||
if (androidPlayStoreCountry.value == null) {
|
||||
LaunchedEffect(Unit) {
|
||||
if (androidPlayStoreCountry.value == null) platform.androidLoadPlayStoreCountry()
|
||||
}
|
||||
}
|
||||
return androidPlayStoreCountry.value == "US"
|
||||
return isInUs()
|
||||
}
|
||||
|
||||
fun isInUs(): Boolean =
|
||||
androidPlayStoreCountry.value == "US"
|
||||
|| androidPlayStoreCountry.value == ""
|
||||
|| androidPlayStoreCountry.value == null
|
||||
|
||||
@Composable
|
||||
private fun InvestInSimpleXChatView(modalManager: ModalManager) {
|
||||
if (!crowdfundingAvailable()) return
|
||||
|
||||
Reference in New Issue
Block a user