Prepare to show backups megaphone to beta users.

This commit is contained in:
Greyson Parrelli
2025-11-11 16:10:38 -05:00
committed by Alex Hart
parent ad45ca1fcc
commit 7adcc466ad
3 changed files with 12 additions and 2 deletions

View File

@@ -454,7 +454,7 @@ public final class Megaphones {
public static @NonNull Megaphone buildTurnOnSignalBackupsMegaphone() {
return new Megaphone.Builder(Event.TURN_ON_SIGNAL_BACKUPS, Megaphone.Style.BASIC)
.setImage(R.drawable.backups_megaphone_image)
.setTitle(R.string.TurnOnSignalBackups__title)
.setTitle(R.string.TurnOnSignalBackups__title_beta)
.setBody(R.string.TurnOnSignalBackups__body)
.setActionButton(R.string.TurnOnSignalBackups__turn_on, (megaphone, controller) -> {
Intent intent = AppSettingsActivity.remoteBackups(controller.getMegaphoneActivity());
@@ -560,7 +560,7 @@ public final class Megaphones {
}
private static boolean shouldShowTurnOnBackupsMegaphone(@NonNull Context context) {
if (!Environment.IS_STAGING) {
if (!RemoteConfig.backupsBetaMegaphone()) {
return false;
}

View File

@@ -1197,5 +1197,13 @@ object RemoteConfig {
defaultValue = false,
hotSwappable = true
)
@JvmStatic
@get:JvmName("backupsBetaMegaphone")
val backupsBetaMegaphone: Boolean by remoteBoolean(
key = "android.backupsBetaMegaphone",
defaultValue = false,
hotSwappable = true
)
// endregion
}

View File

@@ -7770,6 +7770,8 @@
<!-- Title of a megaphone shown at the bottom of the chat list to prompt the user to enable message backups -->
<string name="TurnOnSignalBackups__title">Turn on Signal Secure Backups</string>
<!-- Title of a megaphone shown at the bottom of the chat list to prompt the user to enable message backups. Special string for the beta period. -->
<string name="TurnOnSignalBackups__title_beta">Try Signal Secure Backups</string>
<!-- Body of a megaphone shown at the bottom of the chat list to prompt the user to enable message backups -->
<string name="TurnOnSignalBackups__body">Never lose a message when you get a new phone or reinstall Signal.</string>
<!-- Button of a megaphone shown at the bottom of the chat list to prompt the user to enable message backups that will take the user to the flow to enable backups -->