Fix sms megaphone bug.

main
Cody Henthorne 2022-10-31 10:40:35 -04:00
rodzic 9f2c7a65ac
commit b781de2c17
3 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -26,7 +26,7 @@ public final class MiscellaneousValues extends SignalStoreValues {
private static final String LAST_FCM_FOREGROUND_TIME = "misc.last_fcm_foreground_time";
private static final String LAST_FOREGROUND_TIME = "misc.last_foreground_time";
private static final String PNI_INITIALIZED_DEVICES = "misc.pni_initialized_devices";
private static final String SMS_PHASE_1_START_MS = "misc.sms_export.phase_1_start";
private static final String SMS_PHASE_1_START_MS = "misc.sms_export.phase_1_start.2";
private static final String STORIES_FEATURE_AVAILABLE_MS = "misc.stories_feature_available_ms";
MiscellaneousValues(@NonNull KeyValueStore store) {

Wyświetl plik

@ -36,6 +36,10 @@ class SmsExportReminderSchedule(private val context: Context) : MegaphoneSchedul
@Suppress("UsePropertyAccessSyntax")
@WorkerThread
fun shouldShowMegaphone(): Boolean {
if (!Stories.isFeatureFlagEnabled()) {
return false
}
return if (Stories.isFeatureFlagEnabled() && SignalStore.misc().storiesFeatureAvailableTimestamp == 0L) {
SignalStore.misc().storiesFeatureAvailableTimestamp = System.currentTimeMillis()
false

Wyświetl plik

@ -102,7 +102,7 @@ public final class FeatureFlags {
private static final String SMS_EXPORTER = "android.sms.exporter.2";
public static final String STORIES_LOCALE = "android.stories.locale.2";
private static final String HIDE_CONTACTS = "android.hide.contacts";
private static final String SMS_EXPORT_MEGAPHONE_DELAY_DAYS = "android.smsExport.megaphoneDelayDays";
private static final String SMS_EXPORT_MEGAPHONE_DELAY_DAYS = "android.smsExport.megaphoneDelayDays.2";
public static final String CREDIT_CARD_PAYMENTS = "android.credit.card.payments";
/**