mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-05 04:45:14 +01:00
Allow 'next monday' schedule for all users.
This commit is contained in:
committed by
Alex Hart
parent
364f2baf4b
commit
da8af40e4f
+7
-10
@@ -8,7 +8,6 @@ import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.components.menu.ActionItem
|
||||
import org.thoughtcrime.securesms.components.menu.SignalContextMenu
|
||||
import org.thoughtcrime.securesms.util.DateUtils
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig
|
||||
import org.thoughtcrime.securesms.util.toLocalDateTime
|
||||
import org.thoughtcrime.securesms.util.toMillis
|
||||
import java.time.DayOfWeek
|
||||
@@ -73,15 +72,13 @@ class ScheduleMessageContextMenu {
|
||||
}
|
||||
}
|
||||
|
||||
if (RemoteConfig.internalUser) {
|
||||
val now = currentTimeMs.toLocalDateTime()
|
||||
if (now.dayOfWeek == DayOfWeek.FRIDAY || now.dayOfWeek == DayOfWeek.SATURDAY) {
|
||||
val nextMonday = now.with(TemporalAdjusters.next(DayOfWeek.MONDAY))
|
||||
.withHour(8)
|
||||
.withMinute(0)
|
||||
.withSecond(0)
|
||||
timestampList += nextMonday.toMillis()
|
||||
}
|
||||
val now = currentTimeMs.toLocalDateTime()
|
||||
if (now.dayOfWeek == DayOfWeek.FRIDAY || now.dayOfWeek == DayOfWeek.SATURDAY) {
|
||||
val nextMonday = now.with(TemporalAdjusters.next(DayOfWeek.MONDAY))
|
||||
.withHour(8)
|
||||
.withMinute(0)
|
||||
.withSecond(0)
|
||||
timestampList += nextMonday.toMillis()
|
||||
}
|
||||
|
||||
timestampList += -1
|
||||
|
||||
Reference in New Issue
Block a user