From 445e9511a00e3896d155180d0050be140b2b4ebc Mon Sep 17 00:00:00 2001 From: FooIbar <118464521+FooIbar@users.noreply.github.com> Date: Thu, 7 Dec 2023 19:27:03 +0800 Subject: [PATCH] Flatten layout --- .../ehviewer/ui/screen/GalleryDetailScreen.kt | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryDetailScreen.kt b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryDetailScreen.kt index 4b04676fd..992093898 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryDetailScreen.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryDetailScreen.kt @@ -52,7 +52,6 @@ import androidx.compose.material3.LargeTopAppBar import androidx.compose.material3.ModalBottomSheetFix import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarResult -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.material3.TopAppBarDefaults @@ -1219,23 +1218,21 @@ fun GalleryDetailScreen(args: GalleryDetailScreenArgs, navigator: DestinationsNa ) }, ) { - Surface { - val gi = galleryInfo - if (gi != null) { - GalleryDetailContent( - galleryInfo = gi, - contentPadding = it, - modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection), - ) - } else if (getDetailError.isNotBlank()) { - GalleryDetailErrorTip(error = getDetailError, onClick = { getDetailError = "" }) - } else { - Box( - modifier = Modifier.fillMaxSize(), - contentAlignment = Alignment.Center, - ) { - CircularProgressIndicator() - } + val gi = galleryInfo + if (gi != null) { + GalleryDetailContent( + galleryInfo = gi, + contentPadding = it, + modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection), + ) + } else if (getDetailError.isNotBlank()) { + GalleryDetailErrorTip(error = getDetailError, onClick = { getDetailError = "" }) + } else { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center, + ) { + CircularProgressIndicator() } } }