mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Add re-export SMS support and hard code Phase 0.
This commit is contained in:
committed by
Alex Hart
parent
fd1d2ec8fc
commit
7c60c32918
@@ -4,8 +4,6 @@ import android.content.Context
|
||||
import androidx.annotation.WorkerThread
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.keyvalue.SmsExportPhase
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
||||
import org.thoughtcrime.securesms.util.Util
|
||||
import kotlin.time.Duration.Companion.days
|
||||
|
||||
class SmsExportReminderSchedule(private val context: Context) : MegaphoneSchedule {
|
||||
@@ -32,17 +30,8 @@ class SmsExportReminderSchedule(private val context: Context) : MegaphoneSchedul
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("UsePropertyAccessSyntax")
|
||||
@WorkerThread
|
||||
fun shouldShowMegaphone(): Boolean {
|
||||
return if (SignalStore.misc().storiesFeatureAvailableTimestamp == 0L) {
|
||||
SignalStore.misc().storiesFeatureAvailableTimestamp = System.currentTimeMillis()
|
||||
false
|
||||
} else if (System.currentTimeMillis() > (SignalStore.misc().storiesFeatureAvailableTimestamp + FeatureFlags.smsExportMegaphoneDelayDays().days.inWholeMilliseconds)) {
|
||||
SignalStore.misc().startSmsPhase1()
|
||||
FeatureFlags.smsExporter() && Util.isDefaultSmsProvider(context)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
private fun shouldShowMegaphone(): Boolean {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user