kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove leftover Valentine's Day assets.
rodzic
35199abf1f
commit
63412b0153
|
@ -66,7 +66,7 @@ public final class Megaphones {
|
||||||
private static final MegaphoneSchedule ALWAYS = new ForeverSchedule(true);
|
private static final MegaphoneSchedule ALWAYS = new ForeverSchedule(true);
|
||||||
private static final MegaphoneSchedule NEVER = new ForeverSchedule(false);
|
private static final MegaphoneSchedule NEVER = new ForeverSchedule(false);
|
||||||
|
|
||||||
private static final Set<Event> DONATE_EVENTS = SetUtil.newHashSet(Event.VALENTINES_DONATIONS_2022, Event.BECOME_A_SUSTAINER);
|
private static final Set<Event> DONATE_EVENTS = SetUtil.newHashSet(Event.BECOME_A_SUSTAINER);
|
||||||
private static final long MIN_TIME_BETWEEN_DONATE_MEGAPHONES = TimeUnit.DAYS.toMillis(30);
|
private static final long MIN_TIME_BETWEEN_DONATE_MEGAPHONES = TimeUnit.DAYS.toMillis(30);
|
||||||
|
|
||||||
private Megaphones() {}
|
private Megaphones() {}
|
||||||
|
@ -107,7 +107,6 @@ public final class Megaphones {
|
||||||
put(Event.NOTIFICATIONS, shouldShowNotificationsMegaphone(context) ? RecurringSchedule.every(TimeUnit.DAYS.toMillis(30)) : NEVER);
|
put(Event.NOTIFICATIONS, shouldShowNotificationsMegaphone(context) ? RecurringSchedule.every(TimeUnit.DAYS.toMillis(30)) : NEVER);
|
||||||
put(Event.ONBOARDING, shouldShowOnboardingMegaphone(context) ? ALWAYS : NEVER);
|
put(Event.ONBOARDING, shouldShowOnboardingMegaphone(context) ? ALWAYS : NEVER);
|
||||||
put(Event.BECOME_A_SUSTAINER, shouldShowDonateMegaphone(context, records) ? ShowForDurationSchedule.showForDays(7) : 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());
|
put(Event.PIN_REMINDER, new SignalPinReminderSchedule());
|
||||||
|
|
||||||
// Feature-introduction megaphones should *probably* be added below this divider
|
// Feature-introduction megaphones should *probably* be added below this divider
|
||||||
|
@ -135,8 +134,6 @@ public final class Megaphones {
|
||||||
return buildAddAProfilePhotoMegaphone(context);
|
return buildAddAProfilePhotoMegaphone(context);
|
||||||
case BECOME_A_SUSTAINER:
|
case BECOME_A_SUSTAINER:
|
||||||
return buildBecomeASustainerMegaphone(context);
|
return buildBecomeASustainerMegaphone(context);
|
||||||
case VALENTINES_DONATIONS_2022:
|
|
||||||
return buildValentinesDonationsMegaphone(context);
|
|
||||||
case NOTIFICATION_PROFILES:
|
case NOTIFICATION_PROFILES:
|
||||||
return buildNotificationProfilesMegaphone(context);
|
return buildNotificationProfilesMegaphone(context);
|
||||||
default:
|
default:
|
||||||
|
@ -283,21 +280,6 @@ public final class Megaphones {
|
||||||
.build();
|
.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) {
|
private static @NonNull Megaphone buildNotificationProfilesMegaphone(@NonNull Context context) {
|
||||||
return new Megaphone.Builder(Event.NOTIFICATION_PROFILES, Megaphone.Style.BASIC)
|
return new Megaphone.Builder(Event.NOTIFICATION_PROFILES, Megaphone.Style.BASIC)
|
||||||
.setTitle(R.string.NotificationProfilesMegaphone__notification_profiles)
|
.setTitle(R.string.NotificationProfilesMegaphone__notification_profiles)
|
||||||
|
|
|
@ -64,7 +64,6 @@ public final class FeatureFlags {
|
||||||
private static final String PHONE_NUMBER_PRIVACY_VERSION = "android.phoneNumberPrivacyVersion";
|
private static final String PHONE_NUMBER_PRIVACY_VERSION = "android.phoneNumberPrivacyVersion";
|
||||||
private static final String CLIENT_EXPIRATION = "android.clientExpiration";
|
private static final String CLIENT_EXPIRATION = "android.clientExpiration";
|
||||||
public static final String DONATE_MEGAPHONE = "android.donate.2";
|
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 CUSTOM_VIDEO_MUXER = "android.customVideoMuxer";
|
||||||
private static final String CDS_REFRESH_INTERVAL = "cds.syncInterval.seconds";
|
private static final String CDS_REFRESH_INTERVAL = "cds.syncInterval.seconds";
|
||||||
private static final String AUTOMATIC_SESSION_RESET = "android.automaticSessionReset.2";
|
private static final String AUTOMATIC_SESSION_RESET = "android.automaticSessionReset.2";
|
||||||
|
@ -136,7 +135,6 @@ public final class FeatureFlags {
|
||||||
DONOR_BADGES_DISPLAY,
|
DONOR_BADGES_DISPLAY,
|
||||||
HARDWARE_AEC_MODELS,
|
HARDWARE_AEC_MODELS,
|
||||||
FORCE_DEFAULT_AEC,
|
FORCE_DEFAULT_AEC,
|
||||||
VALENTINES_DONATE_MEGAPHONE,
|
|
||||||
STORIES,
|
STORIES,
|
||||||
STORIES_TEXT_FUNCTIONS,
|
STORIES_TEXT_FUNCTIONS,
|
||||||
STORIES_TEXT_POSTS
|
STORIES_TEXT_POSTS
|
||||||
|
@ -194,8 +192,7 @@ public final class FeatureFlags {
|
||||||
SENDER_KEY_MAX_AGE,
|
SENDER_KEY_MAX_AGE,
|
||||||
DONOR_BADGES_DISPLAY,
|
DONOR_BADGES_DISPLAY,
|
||||||
DONATE_MEGAPHONE,
|
DONATE_MEGAPHONE,
|
||||||
FORCE_DEFAULT_AEC,
|
FORCE_DEFAULT_AEC
|
||||||
VALENTINES_DONATE_MEGAPHONE
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -312,11 +309,6 @@ public final class FeatureFlags {
|
||||||
return getString(DONATE_MEGAPHONE, "");
|
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 the user can choose phone number privacy settings, and;
|
||||||
* Whether to fetch and store the secondary certificate
|
* Whether to fetch and store the secondary certificate
|
||||||
|
|
|
@ -37,13 +37,6 @@ public final class LocaleFeatureFlags {
|
||||||
return isEnabled(FeatureFlags.DONATE_MEGAPHONE, FeatureFlags.donateMegaphone());
|
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<PushMediaConstraints.MediaConfig> getMediaQualityLevel() {
|
public static @NonNull Optional<PushMediaConstraints.MediaConfig> getMediaQualityLevel() {
|
||||||
Map<String, Integer> countryValues = parseCountryValues(FeatureFlags.getMediaQualityLevels(), NOT_FOUND);
|
Map<String, Integer> countryValues = parseCountryValues(FeatureFlags.getMediaQualityLevels(), NOT_FOUND);
|
||||||
int level = getCountryValue(countryValues, Recipient.self().getE164().or(""), NOT_FOUND);
|
int level = getCountryValue(countryValues, Recipient.self().getE164().or(""), NOT_FOUND);
|
||||||
|
|
File diff suppressed because one or more lines are too long
Ładowanie…
Reference in New Issue