From 977db0474ab7494ae768965565677ef935dc7640 Mon Sep 17 00:00:00 2001 From: Ray <154766448+damontecres@users.noreply.github.com> Date: Thu, 1 Jan 2026 15:07:32 -0500 Subject: [PATCH] Small bug fixes (#614) ## Description Fixes the screen showing endless loading when toggling on automatic sign in Ports a bug fix to the device profile from the official app (https://github.com/jellyfin/jellyfin-androidtv/pull/5268) --- .../com/github/damontecres/wholphin/MainActivity.kt | 12 ++++++------ .../wholphin/util/profile/DeviceProfileUtils.kt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/github/damontecres/wholphin/MainActivity.kt b/app/src/main/java/com/github/damontecres/wholphin/MainActivity.kt index 4e6e22b0..b55b6dba 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/MainActivity.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/MainActivity.kt @@ -23,8 +23,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.unit.dp import androidx.datastore.core.DataStore +import androidx.lifecycle.Lifecycle import androidx.lifecycle.ViewModel -import androidx.lifecycle.compose.LifecycleStartEffect +import androidx.lifecycle.compose.LifecycleEventEffect import androidx.lifecycle.lifecycleScope import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewmodel.navigation3.rememberViewModelStoreNavEntryDecorator @@ -224,13 +225,12 @@ class MainActivity : AppCompatActivity() { var showContent by remember { mutableStateOf(true) } - if (!preferences.appPreferences.signInAutomatically) { - LifecycleStartEffect(Unit) { - onStopOrDispose { - showContent = false - } + LifecycleEventEffect(Lifecycle.Event.ON_STOP) { + if (!preferences.appPreferences.signInAutomatically) { + showContent = false } } + if (showContent) { ApplicationContent( user = current.user, diff --git a/app/src/main/java/com/github/damontecres/wholphin/util/profile/DeviceProfileUtils.kt b/app/src/main/java/com/github/damontecres/wholphin/util/profile/DeviceProfileUtils.kt index a143d860..b7d28db1 100644 --- a/app/src/main/java/com/github/damontecres/wholphin/util/profile/DeviceProfileUtils.kt +++ b/app/src/main/java/com/github/damontecres/wholphin/util/profile/DeviceProfileUtils.kt @@ -210,7 +210,7 @@ fun createDeviceProfile( "main", "baseline", "constrained baseline", - if (supportsAVCHigh10) "main 10" else null, + if (supportsAVCHigh10) "high 10" else null, ) } }