Bugfixes for migration UI
This commit is contained in:
parent
7a14d9e17b
commit
a9e2394c6d
@ -1,8 +1,11 @@
|
||||
package eu.kanade.presentation.browse
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.IntrinsicSize
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.material.icons.Icons
|
||||
@ -91,7 +94,8 @@ fun MigrationListScreen(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.animateItemPlacement()
|
||||
.padding(horizontal = 16.dp),
|
||||
.padding(horizontal = 16.dp)
|
||||
.height(IntrinsicSize.Min),
|
||||
horizontalArrangement = Arrangement.SpaceBetween,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
@ -100,7 +104,8 @@ fun MigrationListScreen(
|
||||
modifier = Modifier
|
||||
.padding(top = 8.dp)
|
||||
.weight(1f)
|
||||
.align(Alignment.Top),
|
||||
.align(Alignment.Top)
|
||||
.fillMaxHeight(),
|
||||
manga = migrationItem.manga,
|
||||
sourcesString = migrationItem.sourcesString,
|
||||
chapterInfo = migrationItem.chapterInfo,
|
||||
@ -117,7 +122,8 @@ fun MigrationListScreen(
|
||||
modifier = Modifier
|
||||
.padding(top = 8.dp)
|
||||
.weight(1f)
|
||||
.align(Alignment.Top),
|
||||
.align(Alignment.Top)
|
||||
.fillMaxHeight(),
|
||||
migrationItem = migrationItem,
|
||||
result = result,
|
||||
getManga = getManga,
|
||||
|
@ -3,11 +3,13 @@ package eu.kanade.presentation.browse.components
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.IntrinsicSize
|
||||
import androidx.compose.foundation.layout.aspectRatio
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
@ -37,21 +39,22 @@ fun MigrationItemResult(
|
||||
getSourceName: (Manga) -> String,
|
||||
onMigrationItemClick: (Manga) -> Unit,
|
||||
) {
|
||||
Box(modifier) {
|
||||
Box(modifier.height(IntrinsicSize.Min)) {
|
||||
when (result) {
|
||||
MigratingManga.SearchResult.Searching -> Box(
|
||||
modifier = Modifier
|
||||
.widthIn(max = 150.dp)
|
||||
.fillMaxWidth()
|
||||
.fillMaxSize()
|
||||
.aspectRatio(MangaCover.Book.ratio),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
CircularProgressIndicator()
|
||||
}
|
||||
MigratingManga.SearchResult.NotFound -> Column(
|
||||
Modifier.widthIn(max = 150.dp)
|
||||
.fillMaxWidth()
|
||||
.padding(4.dp),
|
||||
Modifier
|
||||
.widthIn(max = 150.dp)
|
||||
.fillMaxSize()
|
||||
.padding(top = 4.dp),
|
||||
) {
|
||||
Image(
|
||||
painter = rememberResourceBitmapPainter(id = R.drawable.cover_error),
|
||||
@ -59,7 +62,7 @@ fun MigrationItemResult(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.aspectRatio(MangaCover.Book.ratio)
|
||||
.clip(RoundedCornerShape(4.dp)),
|
||||
.clip(MaterialTheme.shapes.extraSmall),
|
||||
contentScale = ContentScale.Crop,
|
||||
)
|
||||
Text(
|
||||
@ -86,7 +89,7 @@ fun MigrationItemResult(
|
||||
if (item != null) {
|
||||
val (manga, chapterInfo, source) = item!!
|
||||
MigrationItem(
|
||||
modifier = Modifier,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
manga = manga,
|
||||
sourcesString = source,
|
||||
chapterInfo = chapterInfo,
|
||||
|
Loading…
x
Reference in New Issue
Block a user