diff --git a/build.gradle.kts b/build.gradle.kts index a93961eb..924b213e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,8 +33,8 @@ tasks.register("getVersion") { } // You can still set these for legacy use by submodules or scripts: -rootProject.ext.set("appVersionName", providers.gradleProperty("APP_VERSION_NAME").orElse("1.4.9").get()) -rootProject.ext.set("appVersionCode", providers.gradleProperty("APP_VERSION_CODE").orElse("290").get().toInt()) +rootProject.ext.set("appVersionName", providers.gradleProperty("APP_VERSION_NAME").orElse("1.5.0").get()) +rootProject.ext.set("appVersionCode", providers.gradleProperty("APP_VERSION_CODE").orElse("292").get().toInt()) rootProject.ext.set("applicationId", "me.eternal.purrfectsnap") // buildHash: when PurrfectSnap or Snapchat is updated, mappings become outdated and auto-regenerate. // Include version code so each release has a different hash; use random for uniqueness within same version. diff --git a/changelogs-stable.txt b/changelogs-stable.txt index 9b6ae47f..d7d3aa21 100644 --- a/changelogs-stable.txt +++ b/changelogs-stable.txt @@ -1,3 +1,7 @@ +## v1.5.0 +- Fix: Skip when marking as seen for newer versions of Snapchat +- New: Hide Conversation Toolbox UI + ## v1.4.9 - Fix: Force AMOLED Theme for newer versions of Snapchat - New: Redesign some dialogs(Call confirmation & Mark Snaps as seen) diff --git a/common/src/main/assets/lang/en_US.json b/common/src/main/assets/lang/en_US.json index 144f6c0d..a3e08118 100644 --- a/common/src/main/assets/lang/en_US.json +++ b/common/src/main/assets/lang/en_US.json @@ -2190,6 +2190,10 @@ "force_message_encryption": { "name": "Force Message Encryption", "description": "Prevents sending encrypted messages to people who don't have E2E Encryption enabled only when multiple conversations are selected" + }, + "hide_conversation_toolbox_ui": { + "name": "Hide Conversation Toolbox UI", + "description": "Hides the PurrfectSnap conversation toolbox button that appears in Snapchat when End-To-End Encryption is enabled" } } }, diff --git a/common/src/main/kotlin/me/eternal/purrfectsnap/common/config/impl/Experimental.kt b/common/src/main/kotlin/me/eternal/purrfectsnap/common/config/impl/Experimental.kt index 1ec80c73..de75eda1 100644 --- a/common/src/main/kotlin/me/eternal/purrfectsnap/common/config/impl/Experimental.kt +++ b/common/src/main/kotlin/me/eternal/purrfectsnap/common/config/impl/Experimental.kt @@ -51,6 +51,7 @@ class Experimental : ConfigContainer() { class E2EEConfig : ConfigContainer(hasGlobalState = true) { val encryptedMessageIndicator = boolean("encrypted_message_indicator") val forceMessageEncryption = boolean("force_message_encryption") + val hideConversationToolboxUi = boolean("hide_conversation_toolbox_ui") } class AccountSwitcherConfig : ConfigContainer(hasGlobalState = true) { diff --git a/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/experiments/EndToEndEncryption.kt b/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/experiments/EndToEndEncryption.kt index 2ca19072..0be1daa9 100644 --- a/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/experiments/EndToEndEncryption.kt +++ b/core/src/main/kotlin/me/eternal/purrfectsnap/core/features/impl/experiments/EndToEndEncryption.kt @@ -249,30 +249,34 @@ class EndToEndEncryption : MessagingRuleFeature( } onNextActivityCreate(defer = true) { - context.feature(ConversationToolbox::class).addComposable(translation["confirmation_dialogs.title"], filter = { - context.database.getDMOtherParticipant(it) != null - }) { dialog, conversationId -> - val friendId = remember { - context.database.getDMOtherParticipant(conversationId) - } ?: return@addComposable - val fingerprint = remember { - runCatching { - e2eeInterface.getSecretFingerprint(friendId) - }.getOrNull() - } - if (fingerprint != null) { - Text(translation.format("toolbox.shared_key_fingerprint", "fingerprint" to fingerprint)) - } else { - Text(translation["toolbox.no_shared_key"]) - } - Spacer(modifier = Modifier.height(10.dp)) - Button(onClick = { - dialog.dismiss() - warnKeyOverwrite(friendId) { - askForKeys(conversationId) + val hideConversationToolboxUi by context.config.experimental.e2eEncryption.hideConversationToolboxUi + + if (!hideConversationToolboxUi) { + context.feature(ConversationToolbox::class).addComposable(translation["confirmation_dialogs.title"], filter = { + context.database.getDMOtherParticipant(it) != null + }) { dialog, conversationId -> + val friendId = remember { + context.database.getDMOtherParticipant(conversationId) + } ?: return@addComposable + val fingerprint = remember { + runCatching { + e2eeInterface.getSecretFingerprint(friendId) + }.getOrNull() + } + if (fingerprint != null) { + Text(translation.format("toolbox.shared_key_fingerprint", "fingerprint" to fingerprint)) + } else { + Text(translation["toolbox.no_shared_key"]) + } + Spacer(modifier = Modifier.height(10.dp)) + Button(onClick = { + dialog.dismiss() + warnKeyOverwrite(friendId) { + askForKeys(conversationId) + } + }) { + Text(translation["toolbox.initiate_exchange_button"]) } - }) { - Text(translation["toolbox.initiate_exchange_button"]) } } diff --git a/gradle.properties b/gradle.properties index 0788cd60..dfd8f5b9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,8 +7,8 @@ org.gradle.configuration-cache=true org.gradle.configuration-cache.problems=warn nativeAbis=arm64-v8a -APP_VERSION_NAME=1.4.9 -APP_VERSION_CODE=290 +APP_VERSION_NAME=1.5.0 +APP_VERSION_CODE=292 debug_build_hash=18fe2a814d0e2eb5 psIntegrityPinnedSha256= EXPECTED_CERT_SHA256=0f188cb17d8ea4902ee15ce98f4928ba4226a4790fa3c52f62d776b08e46ca1c