Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class HomeSettingsService
settings.rows.mapIndexed { index, config ->
resolve(index, config)
}
HomePageResolvedSettings(resolvedRows)
HomePageResolvedSettings(userId, resolvedRows)
} else {
createDefault(userId)
}
Expand All @@ -256,12 +256,15 @@ class HomeSettingsService
/**
* Resolve the settings and set them to be the current settings
*/
suspend fun updateCurrent(settings: HomePageSettings) {
suspend fun updateCurrent(
userId: UUID,
settings: HomePageSettings,
) {
val resolvedRows =
settings.rows.mapIndexed { index, config ->
resolve(index, config)
}
val resolvedSettings = HomePageResolvedSettings(resolvedRows)
val resolvedSettings = HomePageResolvedSettings(userId, resolvedRows)
currentSettings.update { resolvedSettings }
}

Expand Down Expand Up @@ -312,7 +315,7 @@ class HomeSettingsService
),
)
val rowConfig = continueWatchingRow + includedIds
return HomePageResolvedSettings(rowConfig)
return HomePageResolvedSettings(userId, rowConfig)
}

/**
Expand Down Expand Up @@ -428,7 +431,7 @@ class HomeSettingsService
null
}
}.flatten()
HomePageResolvedSettings(rowConfigs)
HomePageResolvedSettings(userId, rowConfigs)
} else {
null
}
Expand Down Expand Up @@ -1224,10 +1227,11 @@ data class HomeRowConfigDisplay(
* @see HomePageSettings
*/
data class HomePageResolvedSettings(
val userId: UUID,
val rows: List<HomeRowConfigDisplay>,
) {
companion object {
val EMPTY = HomePageResolvedSettings(listOf())
val EMPTY = HomePageResolvedSettings(UUID.randomUUID(), emptyList())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class SetupNavigationManager
fun navigateTo(destination: SetupDestination) {
backStack[0] = destination
log()
if (destination !is SetupDestination.AppContent) {
navigationManager.reloadHome()
}
}

private fun log() {
Expand Down
Loading
Loading