Fix debug time ordering

This commit is contained in:
andrew 2023-09-04 12:18:41 +09:30
parent f1d3518f1c
commit 2d89dda2dd

View File

@ -290,15 +290,24 @@ private fun timeOptions(state: State) =
private val DEBUG_TIME = 1.minutes
val afterSendTimes = buildList {
if (BuildConfig.DEBUG) add(DEBUG_TIME)
val defaultTimes = buildList {
add(12.hours)
add(1.days)
add(7.days)
add(14.days)
}
val afterReadTimes = listOf(5.minutes, 1.hours) + afterSendTimes
val afterSendTimes = buildList {
if (BuildConfig.DEBUG) add(DEBUG_TIME)
addAll(defaultTimes)
}
val afterReadTimes = buildList {
if (BuildConfig.DEBUG) add(DEBUG_TIME)
add(5.minutes)
add(1.hours)
addAll(defaultTimes)
}
private fun timeOptionsOnly(state: State) = listOfNotNull(
typeOption(ExpiryType.NONE, state, R.string.arrays__off, enabled = state.isSelfAdmin),