Fix unnecessary home page reloads (#2008)

## Description
Fixes the home page reloading from scratch when the app is resumed

This happened because the `userDto` is updated on app resume and since
it has a last accessed timestamp, it would always different and trigger
a reload.

### Related issues
Bug introduced by #1981

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-09-28 13:18:41 -04:00 • committed by GitHub
parent 365f8f8ada
commit 65954a99eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 61 additions and 36 deletions

View file

@ -9,6 +9,7 @@ import com.github.damontecres.wholphin.data.model.HomePageSettings
import com.github.damontecres.wholphin.data.model.HomeRowConfig
import com.github.damontecres.wholphin.data.model.HomeRowViewOptions
import com.github.damontecres.wholphin.data.model.SUPPORTED_HOME_PAGE_SETTINGS_VERSION
import com.github.damontecres.wholphin.data.model.ServerUserConfig
import com.github.damontecres.wholphin.data.model.createGenreDestination
import com.github.damontecres.wholphin.data.model.createStudioDestination
import com.github.damontecres.wholphin.preferences.DefaultUserConfiguration
@ -591,7 +592,7 @@ class HomeSettingsService
row: HomeRowConfig,
scope: CoroutineScope,
prefs: HomePagePreferences,
userDto: UserDto,
userDto: ServerUserConfig,
libraries: List<Library>,
limit: Int = prefs.maxItemsPerRow,
isRefresh: Boolean,

View file

@ -5,6 +5,7 @@ import com.github.damontecres.wholphin.data.ServerPreferencesDao
import com.github.damontecres.wholphin.data.ServerRepository
import com.github.damontecres.wholphin.data.model.JellyfinUser
import com.github.damontecres.wholphin.data.model.NavPinType
import com.github.damontecres.wholphin.data.model.ServerUserConfig
import com.github.damontecres.wholphin.services.hilt.DefaultCoroutineScope
import com.github.damontecres.wholphin.ui.collectLatestIn
import com.github.damontecres.wholphin.ui.launchDefault
@ -188,7 +189,7 @@ class NavDrawerService
*/
suspend fun updateNavDrawer(
user: JellyfinUser,
userDto: UserDto,
userDto: ServerUserConfig,
discoverActive: Boolean,
) {
val builtins =