mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-07-30 16:19:25 +00:00
fix: reorder general items, and adding animatecontentsize in epiosde section
This commit is contained in:
parent
67eaba085f
commit
a826f58ded
4 changed files with 26 additions and 32 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package com.nuvio.app.features.details
|
||||
|
||||
import androidx.compose.animation.Crossfade
|
||||
import androidx.compose.animation.core.Animatable
|
||||
import androidx.compose.animation.core.LinearOutSlowInEasing
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
import androidx.compose.animation.core.tween
|
||||
|
|
@ -39,7 +38,6 @@ import androidx.compose.runtime.rememberCoroutineScope
|
|||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.alpha
|
||||
import androidx.compose.ui.draw.blur
|
||||
import androidx.compose.ui.graphics.Brush
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
|
@ -125,7 +123,6 @@ fun MetaDetailsScreen(
|
|||
WatchProgressRepository.ensureLoaded()
|
||||
WatchProgressRepository.uiState
|
||||
}.collectAsStateWithLifecycle()
|
||||
val screenAlpha = remember(type, id) { Animatable(0f) }
|
||||
val needsFreshLoad = displayedMeta == null && !uiState.isLoading
|
||||
var selectedEpisodeForActions by remember(type, id) { mutableStateOf<MetaVideo?>(null) }
|
||||
val commentsEnabled by remember {
|
||||
|
|
@ -173,22 +170,12 @@ fun MetaDetailsScreen(
|
|||
}
|
||||
|
||||
LaunchedEffect(type, id, needsFreshLoad) {
|
||||
if (!needsFreshLoad) {
|
||||
screenAlpha.snapTo(1f)
|
||||
return@LaunchedEffect
|
||||
}
|
||||
screenAlpha.snapTo(0f)
|
||||
screenAlpha.animateTo(
|
||||
targetValue = 1f,
|
||||
animationSpec = tween(durationMillis = 220),
|
||||
)
|
||||
MetaDetailsRepository.load(type, id)
|
||||
if (needsFreshLoad) MetaDetailsRepository.load(type, id)
|
||||
}
|
||||
|
||||
Box(
|
||||
modifier = modifier
|
||||
.fillMaxSize()
|
||||
.alpha(screenAlpha.value)
|
||||
.background(MaterialTheme.colorScheme.background),
|
||||
) {
|
||||
when {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.nuvio.app.features.details.components
|
|||
|
||||
import androidx.compose.animation.AnimatedContent
|
||||
import androidx.compose.animation.Crossfade
|
||||
import androidx.compose.animation.animateContentSize
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.animation.fadeIn
|
||||
import androidx.compose.animation.fadeOut
|
||||
|
|
@ -156,6 +157,7 @@ fun DetailSeriesContent(
|
|||
.any { !it.seasonPoster.isNullOrBlank() }
|
||||
}
|
||||
Column(
|
||||
modifier = Modifier.animateContentSize(animationSpec = tween(280)),
|
||||
verticalArrangement = Arrangement.spacedBy(12.dp),
|
||||
) {
|
||||
Row(
|
||||
|
|
|
|||
|
|
@ -66,14 +66,6 @@ internal fun LazyListScope.settingsRootContent(
|
|||
isTablet = isTablet,
|
||||
) {
|
||||
SettingsGroup(isTablet = isTablet) {
|
||||
SettingsNavigationRow(
|
||||
title = "Playback",
|
||||
description = "Control player behavior and viewing defaults.",
|
||||
icon = Icons.Rounded.PlayArrow,
|
||||
isTablet = isTablet,
|
||||
onClick = onPlaybackClick,
|
||||
)
|
||||
SettingsGroupDivider(isTablet = isTablet)
|
||||
SettingsNavigationRow(
|
||||
title = "Appearance",
|
||||
description = "Tune home presentation and visual preferences.",
|
||||
|
|
@ -82,14 +74,6 @@ internal fun LazyListScope.settingsRootContent(
|
|||
onClick = onAppearanceClick,
|
||||
)
|
||||
SettingsGroupDivider(isTablet = isTablet)
|
||||
SettingsNavigationRow(
|
||||
title = "Notifications",
|
||||
description = "Manage episode release alerts and send a test notification.",
|
||||
icon = Icons.Rounded.Notifications,
|
||||
isTablet = isTablet,
|
||||
onClick = onNotificationsClick,
|
||||
)
|
||||
SettingsGroupDivider(isTablet = isTablet)
|
||||
SettingsNavigationRow(
|
||||
title = "Content & Discovery",
|
||||
description = "Manage addons and discovery sources.",
|
||||
|
|
@ -98,6 +82,14 @@ internal fun LazyListScope.settingsRootContent(
|
|||
onClick = onContentDiscoveryClick,
|
||||
)
|
||||
SettingsGroupDivider(isTablet = isTablet)
|
||||
SettingsNavigationRow(
|
||||
title = "Playback",
|
||||
description = "Control player behavior and viewing defaults.",
|
||||
icon = Icons.Rounded.PlayArrow,
|
||||
isTablet = isTablet,
|
||||
onClick = onPlaybackClick,
|
||||
)
|
||||
SettingsGroupDivider(isTablet = isTablet)
|
||||
SettingsNavigationRow(
|
||||
title = "Integrations",
|
||||
description = "Connect TMDB and MDBList services.",
|
||||
|
|
@ -105,6 +97,14 @@ internal fun LazyListScope.settingsRootContent(
|
|||
isTablet = isTablet,
|
||||
onClick = onIntegrationsClick,
|
||||
)
|
||||
SettingsGroupDivider(isTablet = isTablet)
|
||||
SettingsNavigationRow(
|
||||
title = "Notifications",
|
||||
description = "Manage episode release alerts and send a test notification.",
|
||||
icon = Icons.Rounded.Notifications,
|
||||
isTablet = isTablet,
|
||||
onClick = onNotificationsClick,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@
|
|||
objectVersion = 77;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
7397CF462F80FE3A00AC0F84 /* MPVKit in Frameworks */ = {isa = PBXBuildFile; productRef = A1B2C3D4E5F6A7B8C9D0E1F2 /* MPVKit */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
07921B4E8F8546BEE682C2FE /* Nuvio.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Nuvio.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
|
@ -41,6 +45,7 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7397CF462F80FE3A00AC0F84 /* MPVKit in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -115,11 +120,11 @@
|
|||
);
|
||||
mainGroup = 4BD16EE0A246E7EC8E40D563;
|
||||
minimizedProjectReferenceProxies = 1;
|
||||
preferredProjectObjectVersion = 77;
|
||||
productRefGroup = AD93033A33973C81BB77B73A /* Products */;
|
||||
packageReferences = (
|
||||
F1E2D3C4B5A6F7E8D9C0B1A2 /* XCLocalSwiftPackageReference "../MPVKit" */,
|
||||
);
|
||||
preferredProjectObjectVersion = 77;
|
||||
productRefGroup = AD93033A33973C81BB77B73A /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
|
|
|
|||
Loading…
Reference in a new issue