mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-13 20:48:56 +01:00
Change fetch interval action to show days until next expected update
This commit is contained in:
@@ -104,7 +104,7 @@ class MangaScreen(
|
||||
MangaScreen(
|
||||
state = successState,
|
||||
snackbarHostState = screenModel.snackbarHostState,
|
||||
fetchInterval = successState.manga.fetchInterval,
|
||||
nextUpdate = successState.manga.expectedNextUpdate,
|
||||
isTabletUi = isTabletUi(),
|
||||
chapterSwipeStartAction = screenModel.chapterSwipeStartAction,
|
||||
chapterSwipeEndAction = screenModel.chapterSwipeEndAction,
|
||||
@@ -146,7 +146,7 @@ class MangaScreen(
|
||||
onDownloadActionClicked = screenModel::runDownloadAction.takeIf { !successState.source.isLocalOrStub() },
|
||||
onEditCategoryClicked = screenModel::showChangeCategoryDialog.takeIf { successState.manga.favorite },
|
||||
onEditFetchIntervalClicked = screenModel::showSetFetchIntervalDialog.takeIf {
|
||||
screenModel.isUpdateIntervalEnabled && successState.manga.favorite
|
||||
successState.manga.favorite
|
||||
},
|
||||
onMigrateClicked = {
|
||||
navigator.push(MigrateSearchScreen(successState.manga.id))
|
||||
@@ -243,9 +243,10 @@ class MangaScreen(
|
||||
is MangaScreenModel.Dialog.SetFetchInterval -> {
|
||||
SetIntervalDialog(
|
||||
interval = dialog.manga.fetchInterval,
|
||||
nextUpdate = dialog.manga.nextUpdate,
|
||||
nextUpdate = dialog.manga.expectedNextUpdate,
|
||||
onDismissRequest = onDismissRequest,
|
||||
onValueChanged = { screenModel.setFetchInterval(dialog.manga, it) },
|
||||
onValueChanged = { interval: Int -> screenModel.setFetchInterval(dialog.manga, interval) }
|
||||
.takeIf { screenModel.isUpdateIntervalEnabled },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user