Remove Phase 2 in preparation for CFv2.

This commit is contained in:
Cody Henthorne
2023-07-19 19:46:45 -04:00
parent dc69bcf6f2
commit 7617cc0a80
3 changed files with 9 additions and 25 deletions

View File

@@ -2,10 +2,7 @@ package org.thoughtcrime.securesms.megaphone
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.Util
import kotlin.time.Duration.Companion.days
class SmsExportReminderSchedule(private val context: Context) : MegaphoneSchedule {
@@ -14,15 +11,10 @@ class SmsExportReminderSchedule(private val context: Context) : MegaphoneSchedul
var showPhase3Megaphone = true
}
private val fullScreenSchedule = RecurringSchedule(1.days.inWholeMilliseconds)
@WorkerThread
override fun shouldDisplay(seenCount: Int, lastSeen: Long, firstVisible: Long, currentTime: Long): Boolean {
return if (Util.isDefaultSmsProvider(context)) {
when (SignalStore.misc().smsExportPhase) {
SmsExportPhase.PHASE_2 -> fullScreenSchedule.shouldDisplay(seenCount, lastSeen, firstVisible, currentTime)
SmsExportPhase.PHASE_3 -> showPhase3Megaphone
}
showPhase3Megaphone
} else {
false
}