ui: All list screens use home-style 4-per-row card size

Grid screens (My videos, History, Search, channel pages) switch from
3-column to adaptive columns sized exactly like the Home rows' cards,
with the compact single-line title, so every screen reads the same.
This commit is contained in:
Jeena 2026-10-11 06:13:59 +00:00
parent b3b39976fe
commit f5535eec3f

View file

@ -33,6 +33,7 @@ import androidx.lifecycle.viewmodel.compose.viewModel
import net.jeena.jtubetv.R import net.jeena.jtubetv.R
import net.jeena.jtubetv.data.api.VideoDto import net.jeena.jtubetv.data.api.VideoDto
import net.jeena.jtubetv.ui.list.PagedListViewModel import net.jeena.jtubetv.ui.list.PagedListViewModel
import net.jeena.jtubetv.ui.screens.rowCardWidth
import net.jeena.jtubetv.ui.list.ListSource import net.jeena.jtubetv.ui.list.ListSource
import net.jeena.jtubetv.ui.list.VideoListItem import net.jeena.jtubetv.ui.list.VideoListItem
import net.jeena.jtubetv.ui.list.VideoListViewModel import net.jeena.jtubetv.ui.list.VideoListViewModel
@ -120,7 +121,8 @@ fun VideoListScreen(
} }
LazyVerticalGrid( LazyVerticalGrid(
columns = GridCells.Fixed(3), // Same card size as the Home rows: ~4 fit per row (user request).
columns = GridCells.Adaptive(rowCardWidth() - 12.dp),
state = gridState, state = gridState,
modifier = Modifier.fillMaxSize().padding(vertical = 8.dp), modifier = Modifier.fillMaxSize().padding(vertical = 8.dp),
) { ) {
@ -136,6 +138,7 @@ fun VideoListScreen(
video = video, video = video,
onClick = { lastOpenedIndex = index; onOpenVideo(video) }, onClick = { lastOpenedIndex = index; onOpenVideo(video) },
showPrivacy = source is ListSource.MyVideos, showPrivacy = source is ListSource.MyVideos,
compact = true,
onLeftAtStart = if (index == 0) onOpenDrawer else null, onLeftAtStart = if (index == 0) onOpenDrawer else null,
modifier = Modifier modifier = Modifier
.focusRequester(fr), .focusRequester(fr),