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.
This commit is contained in:
Leonardo Montemurro 2026-04-27 15:01:23 +02:00
parent e15a398f3e
commit ee61f2d83c

View file

@ -70,6 +70,7 @@ object ProfileRepository {
val stored = decodeStoredPayload() ?: return false val stored = decodeStoredPayload() ?: return false
loadedCacheForUserId = stored.userId loadedCacheForUserId = stored.userId
applyStoredPayload(stored) applyStoredPayload(stored)
ThemeSettingsRepository.onProfileChanged()
return _state.value.profiles.isNotEmpty() return _state.value.profiles.isNotEmpty()
} }