diff --git a/app/src/main/java/org/thoughtcrime/securesms/megaphone/Megaphones.java b/app/src/main/java/org/thoughtcrime/securesms/megaphone/Megaphones.java index 32eb7310a..57369bb37 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/megaphone/Megaphones.java +++ b/app/src/main/java/org/thoughtcrime/securesms/megaphone/Megaphones.java @@ -66,7 +66,7 @@ public final class Megaphones { private static final MegaphoneSchedule ALWAYS = new ForeverSchedule(true); private static final MegaphoneSchedule NEVER = new ForeverSchedule(false); - private static final Set DONATE_EVENTS = SetUtil.newHashSet(Event.VALENTINES_DONATIONS_2022, Event.BECOME_A_SUSTAINER); + private static final Set DONATE_EVENTS = SetUtil.newHashSet(Event.BECOME_A_SUSTAINER); private static final long MIN_TIME_BETWEEN_DONATE_MEGAPHONES = TimeUnit.DAYS.toMillis(30); private Megaphones() {} @@ -107,7 +107,6 @@ public final class Megaphones { put(Event.NOTIFICATIONS, shouldShowNotificationsMegaphone(context) ? RecurringSchedule.every(TimeUnit.DAYS.toMillis(30)) : NEVER); put(Event.ONBOARDING, shouldShowOnboardingMegaphone(context) ? ALWAYS : NEVER); put(Event.BECOME_A_SUSTAINER, shouldShowDonateMegaphone(context, records) ? ShowForDurationSchedule.showForDays(7) : NEVER); - put(Event.VALENTINES_DONATIONS_2022, NEVER); put(Event.PIN_REMINDER, new SignalPinReminderSchedule()); // Feature-introduction megaphones should *probably* be added below this divider @@ -135,8 +134,6 @@ public final class Megaphones { return buildAddAProfilePhotoMegaphone(context); case BECOME_A_SUSTAINER: return buildBecomeASustainerMegaphone(context); - case VALENTINES_DONATIONS_2022: - return buildValentinesDonationsMegaphone(context); case NOTIFICATION_PROFILES: return buildNotificationProfilesMegaphone(context); default: @@ -283,21 +280,6 @@ public final class Megaphones { .build(); } - private static @NonNull Megaphone buildValentinesDonationsMegaphone(@NonNull Context context) { - return new Megaphone.Builder(Event.VALENTINES_DONATIONS_2022, Megaphone.Style.BASIC) - .setTitle(R.string.ValentinesDayMegaphone_happy_heart_day) - .setImage(R.drawable.ic_valentines_donor_megaphone_64) - .setBody(R.string.ValentinesDayMegaphone_show_your_affection) - .setActionButton(R.string.BecomeASustainerMegaphone__contribute, (megaphone, listener) -> { - listener.onMegaphoneNavigationRequested(AppSettingsActivity.subscriptions(context)); - listener.onMegaphoneCompleted(Event.VALENTINES_DONATIONS_2022); - }) - .setSecondaryButton(R.string.BecomeASustainerMegaphone__no_thanks, (megaphone, listener) -> { - listener.onMegaphoneCompleted(Event.VALENTINES_DONATIONS_2022); - }) - .build(); - } - private static @NonNull Megaphone buildNotificationProfilesMegaphone(@NonNull Context context) { return new Megaphone.Builder(Event.NOTIFICATION_PROFILES, Megaphone.Style.BASIC) .setTitle(R.string.NotificationProfilesMegaphone__notification_profiles) diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java b/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java index 279c56756..1cb32e07b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java @@ -64,7 +64,6 @@ public final class FeatureFlags { private static final String PHONE_NUMBER_PRIVACY_VERSION = "android.phoneNumberPrivacyVersion"; private static final String CLIENT_EXPIRATION = "android.clientExpiration"; public static final String DONATE_MEGAPHONE = "android.donate.2"; - public static final String VALENTINES_DONATE_MEGAPHONE = "android.donate.valentines.2022"; private static final String CUSTOM_VIDEO_MUXER = "android.customVideoMuxer"; private static final String CDS_REFRESH_INTERVAL = "cds.syncInterval.seconds"; private static final String AUTOMATIC_SESSION_RESET = "android.automaticSessionReset.2"; @@ -136,7 +135,6 @@ public final class FeatureFlags { DONOR_BADGES_DISPLAY, HARDWARE_AEC_MODELS, FORCE_DEFAULT_AEC, - VALENTINES_DONATE_MEGAPHONE, STORIES, STORIES_TEXT_FUNCTIONS, STORIES_TEXT_POSTS @@ -194,8 +192,7 @@ public final class FeatureFlags { SENDER_KEY_MAX_AGE, DONOR_BADGES_DISPLAY, DONATE_MEGAPHONE, - FORCE_DEFAULT_AEC, - VALENTINES_DONATE_MEGAPHONE + FORCE_DEFAULT_AEC ); /** @@ -312,11 +309,6 @@ public final class FeatureFlags { return getString(DONATE_MEGAPHONE, ""); } - /** The raw valentine's day donate megaphone CSV string */ - public static String valentinesDonateMegaphone() { - return getString(VALENTINES_DONATE_MEGAPHONE, ""); - } - /** * Whether the user can choose phone number privacy settings, and; * Whether to fetch and store the secondary certificate diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/LocaleFeatureFlags.java b/app/src/main/java/org/thoughtcrime/securesms/util/LocaleFeatureFlags.java index c7426d2fd..577b51121 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/LocaleFeatureFlags.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/LocaleFeatureFlags.java @@ -37,13 +37,6 @@ public final class LocaleFeatureFlags { return isEnabled(FeatureFlags.DONATE_MEGAPHONE, FeatureFlags.donateMegaphone()); } - /** - * In valentines donation megaphone group for given country code - */ - public static boolean isInValentinesDonateMegaphone() { - return isEnabled(FeatureFlags.VALENTINES_DONATE_MEGAPHONE, FeatureFlags.valentinesDonateMegaphone()); - } - public static @NonNull Optional getMediaQualityLevel() { Map countryValues = parseCountryValues(FeatureFlags.getMediaQualityLevels(), NOT_FOUND); int level = getCountryValue(countryValues, Recipient.self().getE164().or(""), NOT_FOUND); diff --git a/app/src/main/res/drawable/ic_valentines_donor_megaphone_64.xml b/app/src/main/res/drawable/ic_valentines_donor_megaphone_64.xml deleted file mode 100644 index f76b77ef2..000000000 --- a/app/src/main/res/drawable/ic_valentines_donor_megaphone_64.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - -