From 2b65ee7b530c5dc50ca688727d975097578d6e5f Mon Sep 17 00:00:00 2001 From: justinzeus Date: Thu, 5 Nov 2026 16:57:20 +0100 Subject: [PATCH] Preserve the person identity guard on Home --- .../org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt | 3 +++ .../java/org/justinvisser/wolfskin/tv/WolfskinApp.kt | 2 +- wolfskin-design/src/main/res/drawable/wolfskin_grid.xml | 5 +---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/test/java/org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt b/app/src/test/java/org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt index 78690396..d9e88778 100644 --- a/app/src/test/java/org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt +++ b/app/src/test/java/org/justinvisser/wolfskin/tv/UpstreamContentFocusTest.kt @@ -18,11 +18,13 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toPixelMap import androidx.compose.ui.input.key.Key import androidx.compose.ui.platform.testTag +import androidx.compose.ui.test.assertIsDisplayed import androidx.compose.ui.test.assertIsFocused import androidx.compose.ui.test.assertIsNotFocused import androidx.compose.ui.test.captureToImage import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText import androidx.compose.ui.test.onRoot import androidx.compose.ui.test.performKeyInput import androidx.compose.ui.test.pressKey @@ -131,6 +133,7 @@ class UpstreamContentFocusTest { rule.runOnIdle { WolfskinScreenPreference.enabled = true } rule.mainClock.advanceTimeBy(1500) rule.waitForIdle() + rule.onNodeWithText("Sign in as Justin to open their Jellyfin library").assertIsDisplayed() val on = rule.onRoot().captureToImage().toPixelMap()[1700, 900] val background = org.justinvisser.wolfskin.design.WolfskinTokens.Color.bg org.junit.Assert.assertEquals("Owned background red", background.red, on.red, 1f / 255f) diff --git a/app/src/wolfskin/java/org/justinvisser/wolfskin/tv/WolfskinApp.kt b/app/src/wolfskin/java/org/justinvisser/wolfskin/tv/WolfskinApp.kt index 700d0b9d..a974a72e 100644 --- a/app/src/wolfskin/java/org/justinvisser/wolfskin/tv/WolfskinApp.kt +++ b/app/src/wolfskin/java/org/justinvisser/wolfskin/tv/WolfskinApp.kt @@ -185,7 +185,7 @@ fun WolfskinApp( val upstream = resolveUpstreamDestination(destination, WolfskinScreenPreference.enabled, viewModel.libraryDestinations) ShellSurface(state, handlesContentKeys = upstream == null) { contentModifier -> when { - upstream != null && state.person.key != viewModel.signedInPerson -> ShellPlaceholder("Sign in as ${state.person.name} to open their Jellyfin library", contentModifier) + (upstream != null || destination is Destination.Home) && state.person.key != viewModel.signedInPerson -> ShellPlaceholder("Sign in as ${state.person.name} to open their Jellyfin library", contentModifier) upstream != null -> DestinationContent(upstream, preferences, viewModel::clearBackdrop, contentModifier) destination is Destination.Home -> HomeDestination(state, server, user, contentModifier) destination is Destination.Wolfskin -> DestinationContent(destination, preferences, viewModel::clearBackdrop, contentModifier) diff --git a/wolfskin-design/src/main/res/drawable/wolfskin_grid.xml b/wolfskin-design/src/main/res/drawable/wolfskin_grid.xml index 98f45c91..e19e2857 100644 --- a/wolfskin-design/src/main/res/drawable/wolfskin_grid.xml +++ b/wolfskin-design/src/main/res/drawable/wolfskin_grid.xml @@ -1,6 +1,3 @@ - - - - +