From ee61f2d83cc3343357f07463aa847cd76f36da18 Mon Sep 17 00:00:00 2001 From: Leonardo Montemurro <221404985+MontesanoDev@users.noreply.github.com> Date: Mon, 27 Apr 2026 15:01:23 +0200 Subject: [PATCH] fix: notify ThemeSettingsRepository when cached profiles are loaded loadCachedProfiles() sets activeProfileIndex but did not notify ThemeSettingsRepository to re-read profile-scoped settings (theme, amoled) from the correct profile key. This ensures theme and other profile-scoped preferences are loaded from the correct profile after the cached profile data is applied. --- .../kotlin/com/nuvio/app/features/profiles/ProfileRepository.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileRepository.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileRepository.kt index b6637490..07a9d9c6 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileRepository.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileRepository.kt @@ -70,6 +70,7 @@ object ProfileRepository { val stored = decodeStoredPayload() ?: return false loadedCacheForUserId = stored.userId applyStoredPayload(stored) + ThemeSettingsRepository.onProfileChanged() return _state.value.profiles.isNotEmpty() }