From 97fb20ad3c6e9e34d83dbb003f5256a8435d8e2e Mon Sep 17 00:00:00 2001 From: tapframe <85391825+tapframe@users.noreply.github.com> Date: Thu, 2 Apr 2026 15:38:38 +0530 Subject: [PATCH] remove hardcoded player label --- .../src/commonMain/kotlin/com/nuvio/app/App.kt | 15 ++++++++++++++- .../app/features/player/PlayerControls.kt | 9 --------- .../app/features/plugins/PluginRepository.kt | 18 +++++++++++++++--- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt index 9f24b5978..efefa492d 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/App.kt @@ -749,7 +749,20 @@ private fun MainAppContent( modifier = Modifier.fillMaxSize(), ) } - composable { backStackEntry -> + composable( + enterTransition = { + if (isIos) fadeIn(animationSpec = tween(220)) else null + }, + exitTransition = { + if (isIos) fadeOut(animationSpec = tween(220)) else null + }, + popEnterTransition = { + if (isIos) fadeIn(animationSpec = tween(220)) else null + }, + popExitTransition = { + if (isIos) fadeOut(animationSpec = tween(220)) else null + }, + ) { backStackEntry -> val route = backStackEntry.toRoute() val launch = remember(route.launchId) { PlayerLaunchStore.get(route.launchId) } if (launch == null) { diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/player/PlayerControls.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/player/PlayerControls.kt index 02e6b5e49..8b9e27b8e 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/player/PlayerControls.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/player/PlayerControls.kt @@ -119,7 +119,6 @@ internal fun PlayerControlsShell( seasonNumber = seasonNumber, episodeNumber = episodeNumber, episodeTitle = episodeTitle, - backendLabel = "Android ยท Media3 ExoPlayer", metrics = metrics, onBack = onBack, modifier = Modifier @@ -171,7 +170,6 @@ private fun PlayerHeader( seasonNumber: Int?, episodeNumber: Int?, episodeTitle: String?, - backendLabel: String, metrics: PlayerLayoutMetrics, onBack: () -> Unit, modifier: Modifier = Modifier, @@ -236,13 +234,6 @@ private fun PlayerHeader( overflow = TextOverflow.Ellipsis, ) } - Text( - text = backendLabel, - style = typeScale.labelXs, - color = Color.White.copy(alpha = 0.9f), - maxLines = 1, - overflow = TextOverflow.Ellipsis, - ) } NuvioBackButton( diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/plugins/PluginRepository.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/plugins/PluginRepository.kt index 2203eb129..41d09dfcf 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/plugins/PluginRepository.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/plugins/PluginRepository.kt @@ -56,10 +56,12 @@ object PluginRepository { fun initialize() { val effectiveProfileId = resolveEffectiveProfileId(ProfileRepository.activeProfileId) + val shouldRefreshStoredRepos = !initialized || currentProfileId != effectiveProfileId ensureStateLoadedForProfile(effectiveProfileId) + if (!shouldRefreshStoredRepos) return _uiState.value.repositories.forEach { repo -> - refreshRepository(repo.manifestUrl) + refreshRepositoryInternal(repo.manifestUrl, pushAfterRefresh = false, ensureInitialized = false) } } @@ -184,12 +186,22 @@ object PluginRepository { fun refreshAll() { initialize() _uiState.value.repositories.forEach { repo -> - refreshRepository(repo.manifestUrl) + refreshRepositoryInternal(repo.manifestUrl, pushAfterRefresh = false, ensureInitialized = false) } } fun refreshRepository(manifestUrl: String, pushAfterRefresh: Boolean = false) { - initialize() + refreshRepositoryInternal(manifestUrl, pushAfterRefresh, ensureInitialized = true) + } + + private fun refreshRepositoryInternal( + manifestUrl: String, + pushAfterRefresh: Boolean, + ensureInitialized: Boolean, + ) { + if (ensureInitialized) { + initialize() + } val existingJob = activeRefreshJobs[manifestUrl] if (existingJob?.isActive == true) return