fix android tv issues, update version
This commit is contained in:
@@ -12,8 +12,8 @@ android {
|
|||||||
applicationId = namespace
|
applicationId = namespace
|
||||||
minSdk = libs.versions.proj.min.get().toInt()
|
minSdk = libs.versions.proj.min.get().toInt()
|
||||||
targetSdk = libs.versions.proj.target.get().toInt()
|
targetSdk = libs.versions.proj.target.get().toInt()
|
||||||
versionCode = 35
|
versionCode = 36
|
||||||
versionName = "1.18"
|
versionName = "1.18.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
@@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Column
|
|||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.LargeTopAppBar
|
import androidx.compose.material3.LargeTopAppBar
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
|
import androidx.compose.material3.TopAppBar
|
||||||
import androidx.compose.material3.TopAppBarDefaults
|
import androidx.compose.material3.TopAppBarDefaults
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.CompositionLocalProvider
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
@@ -19,6 +20,7 @@ import ru.shadowsparky.ui.BaseScreen
|
|||||||
import ru.shadowsparky.ui.LocalBlurState
|
import ru.shadowsparky.ui.LocalBlurState
|
||||||
import ru.shadowsparky.ui.USE_EXPERIMENTAL_RAIL
|
import ru.shadowsparky.ui.USE_EXPERIMENTAL_RAIL
|
||||||
import ru.shadowsparky.ui.applyBlurEffect
|
import ru.shadowsparky.ui.applyBlurEffect
|
||||||
|
import ru.shadowsparky.ui.components.isTv
|
||||||
import ru.shadowsparky.ui.currentWindowType
|
import ru.shadowsparky.ui.currentWindowType
|
||||||
import ru.shadowsparky.ui.isCompact
|
import ru.shadowsparky.ui.isCompact
|
||||||
import ru.shadowsparky.ui.isExpanded
|
import ru.shadowsparky.ui.isExpanded
|
||||||
@@ -110,6 +112,14 @@ fun MainScreenInternal(route: Route, child: Child, rootComponent: RootComponent)
|
|||||||
appBar = {
|
appBar = {
|
||||||
if (windowType.isCompact || !USE_EXPERIMENTAL_RAIL) {
|
if (windowType.isCompact || !USE_EXPERIMENTAL_RAIL) {
|
||||||
navList.firstOrNull { it.route == route }?.title?.let {
|
navList.firstOrNull { it.route == route }?.title?.let {
|
||||||
|
if (isTv()) {
|
||||||
|
TopAppBar(
|
||||||
|
title = { Text(it) },
|
||||||
|
scrollBehavior = scrollBehavior,
|
||||||
|
modifier = Modifier.applyBlurEffect(blurState),
|
||||||
|
colors = ComponentDefaults.topAppBarColors()
|
||||||
|
)
|
||||||
|
} else {
|
||||||
LargeTopAppBar(
|
LargeTopAppBar(
|
||||||
title = { Text(it) },
|
title = { Text(it) },
|
||||||
scrollBehavior = scrollBehavior,
|
scrollBehavior = scrollBehavior,
|
||||||
@@ -118,6 +128,7 @@ fun MainScreenInternal(route: Route, child: Child, rootComponent: RootComponent)
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
currentRoute = route,
|
currentRoute = route,
|
||||||
onSelectNavigation = { rootComponent.navReplace(it) },
|
onSelectNavigation = { rootComponent.navReplace(it) },
|
||||||
|
|||||||
+2
-5
@@ -164,7 +164,7 @@ fun VideosInfo(
|
|||||||
start = paddingValues.calculateStartPadding(layoutDirection),
|
start = paddingValues.calculateStartPadding(layoutDirection),
|
||||||
top = paddingValues.calculateTopPadding(),
|
top = paddingValues.calculateTopPadding(),
|
||||||
end = paddingValues.calculateEndPadding(layoutDirection),
|
end = paddingValues.calculateEndPadding(layoutDirection),
|
||||||
bottom = paddingValues.calculateBottomPadding() + fabHeight
|
bottom = paddingValues.calculateBottomPadding() + (fabHeight / 2)
|
||||||
),
|
),
|
||||||
state = gridState
|
state = gridState
|
||||||
) {
|
) {
|
||||||
@@ -185,10 +185,7 @@ fun VideosInfo(
|
|||||||
extraFab?.let {
|
extraFab?.let {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier.align(Alignment.BottomEnd)
|
modifier = Modifier.align(Alignment.BottomEnd)
|
||||||
.padding(
|
.onGloballyPositioned { coordinates ->
|
||||||
end = 16.dp,
|
|
||||||
bottom = 16.dp
|
|
||||||
).onGloballyPositioned { coordinates ->
|
|
||||||
fabHeight = with(density) {
|
fabHeight = with(density) {
|
||||||
coordinates.size.height.toDp()
|
coordinates.size.height.toDp()
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-4
@@ -62,10 +62,9 @@ fun SavedMovieContent(comp: SavedMovieScreenComponent, paddingValues: PaddingVal
|
|||||||
if (tags?.isNotEmpty() == true) {
|
if (tags?.isNotEmpty() == true) {
|
||||||
FloatingActionButton(
|
FloatingActionButton(
|
||||||
onClick = { filterBottomSheetVisible = true },
|
onClick = { filterBottomSheetVisible = true },
|
||||||
modifier = Modifier.align(Alignment.BottomEnd)
|
modifier = Modifier.padding(
|
||||||
.padding(
|
end = paddingValues.calculateEndPadding(LocalLayoutDirection.current) + 4.dp,
|
||||||
end = paddingValues.calculateEndPadding(LocalLayoutDirection.current) + 16.dp,
|
bottom = paddingValues.calculateBottomPadding() + 4.dp
|
||||||
bottom = paddingValues.calculateBottomPadding() + 16.dp
|
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
|
|||||||
Reference in New Issue
Block a user