fix(bottom-action-menu): Properly close dropdown menu when refreshing selected mangas (#1044)

This commit is contained in:
Cuong-Tran 2025-07-18 12:22:54 +07:00 committed by GitHub
parent 8d65991759
commit 32d448d6ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -267,9 +267,9 @@ fun LibraryBottomActionMenu(
// SY <--
// KMK -->
onClickMerge: (() -> Unit)?,
modifier: Modifier = Modifier,
onClickRefreshSelected: (() -> Unit)? = null,
onClickRefreshSelected: (() -> Unit)?,
// KMK <--
modifier: Modifier = Modifier,
) {
AnimatedVisibility(
visible = visible,
@ -406,7 +406,10 @@ fun LibraryBottomActionMenu(
if (onClickRefreshSelected != null) {
DropdownMenuItem(
text = { Text(stringResource(KMR.strings.action_update)) },
onClick = onClickRefreshSelected,
onClick = {
overFlowOpen = false
onClickRefreshSelected()
},
)
}
// KMK <--

View file

@ -269,10 +269,10 @@ data object LibraryTab : Tab {
} else {
MR.strings.update_already_running
}
snackbarHostState.showSnackbar(context.stringResource(msgRes))
if (started) {
screenModel.clearSelection()
}
snackbarHostState.showSnackbar(context.stringResource(msgRes))
}
},
// KMK <--