Fix padding in history screen
This commit is contained in:
parent
d6977e5676
commit
07c9af4901
@ -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 ->
|
||||
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/black"
|
||||
android:pathData="M15,16h4v2h-4zM15,8h7v2h-7zM15,12h6v2h-6zM3,18c0,1.1 0.9,2 2,2h6c1.1,0 2,-0.9 2,-2L13,8L3,8v10zM5,10h6v8L5,18v-8zM10,4L6,4L5,5L2,5v2h12L14,5h-3z" />
|
||||
</vector>
|
Loading…
Reference in New Issue
Block a user