mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 03:58:56 +01:00
EmptyScreen: Compose-ify and apply content padding (#8177)
* Apply content padding to empty screen except the empty screens in browse * compose-ify EmptyScreen * center face when action show * fix padding * apply content padding to browse tabs * fix duplicate bottom insets
This commit is contained in:
@@ -34,9 +34,10 @@ fun extensionsTab(
|
||||
onClick = { router?.pushController(ExtensionFilterController()) },
|
||||
),
|
||||
),
|
||||
content = {
|
||||
content = { contentPadding ->
|
||||
ExtensionScreen(
|
||||
presenter = presenter,
|
||||
contentPadding = contentPadding,
|
||||
onLongClickItem = { extension ->
|
||||
when (extension) {
|
||||
is Extension.Available -> presenter.installExtension(extension)
|
||||
|
||||
@@ -31,9 +31,10 @@ fun migrateSourcesTab(
|
||||
},
|
||||
),
|
||||
),
|
||||
content = {
|
||||
content = { contentPadding ->
|
||||
MigrateSourceScreen(
|
||||
presenter = presenter,
|
||||
contentPadding = contentPadding,
|
||||
onClickItem = { source ->
|
||||
router?.pushController(
|
||||
MigrationMangaController(
|
||||
|
||||
@@ -32,9 +32,10 @@ fun sourcesTab(
|
||||
onClick = { router?.pushController(SourceFilterController()) },
|
||||
),
|
||||
),
|
||||
content = {
|
||||
content = { contentPadding ->
|
||||
SourcesScreen(
|
||||
presenter = presenter,
|
||||
contentPadding = contentPadding,
|
||||
onClickItem = { source, query ->
|
||||
presenter.onOpenSource(source)
|
||||
router?.pushController(BrowseSourceController(source, query))
|
||||
|
||||
@@ -256,7 +256,10 @@ class DownloadController :
|
||||
},
|
||||
) { contentPadding ->
|
||||
if (downloadList.isEmpty()) {
|
||||
EmptyScreen(textResource = R.string.information_no_downloads)
|
||||
EmptyScreen(
|
||||
textResource = R.string.information_no_downloads,
|
||||
modifier = Modifier.padding(contentPadding),
|
||||
)
|
||||
return@Scaffold
|
||||
}
|
||||
val density = LocalDensity.current
|
||||
|
||||
Reference in New Issue
Block a user