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)
This commit is contained in:
Ray 2026-01-01 15:07:32 -05:00 committed by GitHub
parent 3c11d4ba12
commit 977db0474a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -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,

View file

@ -210,7 +210,7 @@ fun createDeviceProfile(
"main",
"baseline",
"constrained baseline",
if (supportsAVCHigh10) "main 10" else null,
if (supportsAVCHigh10) "high 10" else null,
)
}
}