hide Filter save-button on SourceFeedScreen

This commit is contained in:
Cuong-Tran 2024-10-21 18:35:34 +07:00
parent 7f082b9c97
commit b93d5b937f
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2
2 changed files with 14 additions and 8 deletions

View file

@ -52,6 +52,7 @@ fun SourceFilterDialog(
onSavedSearchPress: (EXHSavedSearch) -> Unit,
// KMK -->
onSavedSearchPressDesc: String,
shouldShowSavingButton: Boolean = true,
// KMK <--
openMangaDexRandom: (() -> Unit)?,
openMangaDexFollows: (() -> Unit)?,
@ -78,15 +79,19 @@ fun SourceFilterDialog(
Spacer(modifier = Modifier.weight(1f))
// SY -->
IconButton(onClick = onSave) {
Icon(
Icons.Default.Save,
contentDescription = stringResource(MR.strings.action_save),
tint = MaterialTheme.colorScheme.onBackground,
)
// KMK -->
if (shouldShowSavingButton) {
// KMK <--
// SY -->
IconButton(onClick = onSave) {
Icon(
Icons.Default.Save,
contentDescription = stringResource(MR.strings.action_save),
tint = MaterialTheme.colorScheme.onBackground,
)
}
// SY <--
}
// SY <--
Button(onClick = {
onFilter()
onDismissRequest()

View file

@ -269,6 +269,7 @@ class SourceFeedScreen(val sourceId: Long) : Screen() {
},
// KMK -->
onSavedSearchPressDesc = stringResource(KMR.strings.saved_searches_add_feed),
shouldShowSavingButton = false,
// KMK <--
openMangaDexRandom = if (screenModel.sourceIsMangaDex) {
{