Disable customized fetch intervals for stable builds for now

Until some of the issues get ironed out.
This commit is contained in:
arkon 2024-01-05 17:38:34 -05:00
parent dba5e6fbfd
commit 850813820c
2 changed files with 6 additions and 4 deletions

View File

@ -19,6 +19,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
import eu.kanade.tachiyomi.util.system.isDevFlavor
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
import kotlinx.collections.immutable.toImmutableList
import tachiyomi.domain.manga.interactor.FetchInterval
import tachiyomi.i18n.MR
@ -72,13 +74,12 @@ fun SetIntervalDialog(
val nextUpdateDays = remember(nextUpdate) {
return@remember if (nextUpdate != null) {
val now = Instant.now()
now.until(nextUpdate, ChronoUnit.DAYS).toInt()
now.until(nextUpdate, ChronoUnit.DAYS).toInt().coerceAtLeast(0)
} else {
null
}
}
// TODO: selecting "1" then doesn't allow for future changes unless defaulting first?
AlertDialog(
onDismissRequest = onDismissRequest,
title = { Text(stringResource(MR.strings.pref_library_update_smart_update)) },
@ -104,7 +105,8 @@ fun SetIntervalDialog(
Spacer(Modifier.height(MaterialTheme.padding.small))
}
if (onValueChanged != null) {
// TODO: selecting "1" then doesn't allow for future changes unless defaulting first?
if (onValueChanged != null && (isDevFlavor || isPreviewBuildType)) {
Text(stringResource(MR.strings.manga_interval_custom_amount))
BoxWithConstraints(

View File

@ -182,7 +182,7 @@ fun MangaActionRow(
val nextUpdateDays = remember(nextUpdate) {
return@remember if (nextUpdate != null) {
val now = Instant.now()
now.until(nextUpdate, ChronoUnit.DAYS).toInt()
now.until(nextUpdate, ChronoUnit.DAYS).toInt().coerceAtLeast(0)
} else {
null
}