From 07c9af49012f13bf9a5790a130c4fbf501666b83 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 23 Jul 2022 11:25:45 -0400 Subject: [PATCH] Fix padding in history screen --- .../eu/kanade/presentation/history/HistoryScreen.kt | 12 ++++++------ app/src/main/res/drawable/ic_delete_sweep_24dp.xml | 9 --------- 2 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_delete_sweep_24dp.xml diff --git a/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt b/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt index 56664ba04..aeeaba192 100644 --- a/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/history/HistoryScreen.kt @@ -1,6 +1,6 @@ package eu.kanade.presentation.history -import androidx.compose.foundation.layout.safeContentPadding +import androidx.compose.foundation.layout.safeDrawingPadding import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -30,18 +30,18 @@ fun HistoryScreen( ) { val context = LocalContext.current Scaffold( - modifier = Modifier.safeContentPadding(), + modifier = Modifier.safeDrawingPadding(), topBar = { HistoryToolbar(state = presenter) }, - ) { + ) { contentPadding -> val items = presenter.getLazyHistory() when { items.loadState.refresh is LoadState.Loading && items.itemCount < 1 -> LoadingScreen() items.loadState.refresh is LoadState.NotLoading && items.itemCount < 1 -> EmptyScreen(textResource = R.string.information_no_recent_manga) else -> HistoryContent( history = items, - contentPadding = it, + contentPadding = contentPadding, onClickCover = onClickCover, onClickResume = onClickResume, onClickDelete = { presenter.dialog = Dialog.Delete(it) }, @@ -62,7 +62,7 @@ fun HistoryScreen( }, ) } - Dialog.DeleteAll -> { + is Dialog.DeleteAll -> { HistoryDeleteAllDialog( onDismissRequest = onDismissRequest, onDelete = { @@ -70,7 +70,7 @@ fun HistoryScreen( }, ) } - else -> {} + null -> {} } LaunchedEffect(Unit) { presenter.events.collectLatest { event -> diff --git a/app/src/main/res/drawable/ic_delete_sweep_24dp.xml b/app/src/main/res/drawable/ic_delete_sweep_24dp.xml deleted file mode 100644 index c618bc134..000000000 --- a/app/src/main/res/drawable/ic_delete_sweep_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - -