mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 03:58:56 +01:00
Fix notification and add visual cues when triggering a second update (#7783)
This commit is contained in:
@@ -35,7 +35,7 @@ fun LibraryScreen(
|
||||
onClickSelectAll: () -> Unit,
|
||||
onClickInvertSelection: () -> Unit,
|
||||
onClickFilter: () -> Unit,
|
||||
onClickRefresh: (Category?) -> Unit,
|
||||
onClickRefresh: (Category?) -> Boolean,
|
||||
) {
|
||||
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
|
||||
val insets = WindowInsets.navigationBars.only(WindowInsetsSides.Horizontal)
|
||||
|
||||
@@ -42,7 +42,7 @@ fun LibraryContent(
|
||||
onChangeCurrentPage: (Int) -> Unit,
|
||||
onMangaClicked: (Long) -> Unit,
|
||||
onToggleSelection: (LibraryManga) -> Unit,
|
||||
onRefresh: (Category?) -> Unit,
|
||||
onRefresh: (Category?) -> Boolean,
|
||||
onGlobalSearchClicked: () -> Unit,
|
||||
getNumberOfMangaForCategory: @Composable (Long) -> State<Int?>,
|
||||
getDisplayModeForPage: @Composable (Int) -> State<DisplayModeSetting>,
|
||||
@@ -84,7 +84,8 @@ fun LibraryContent(
|
||||
SwipeRefresh(
|
||||
state = rememberSwipeRefreshState(isRefreshing = isRefreshing),
|
||||
onRefresh = {
|
||||
onRefresh(categories[currentPage()])
|
||||
val started = onRefresh(categories[currentPage()])
|
||||
if (!started) return@SwipeRefresh
|
||||
scope.launch {
|
||||
// Fake refresh status but hide it after a second as it's a long running task
|
||||
isRefreshing = true
|
||||
|
||||
Reference in New Issue
Block a user