mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Fix a few customize home bugs (#929)
## Description Hopefully this is the last round of bug fixes for customizing the home page! Fixes a possible crash when scrolling after adding a row after resetting to default or loading remote settings that have more rows than the original settings Fixes some incorrect titles ### Related issues Related to #399 & #803 ### Testing Emulator & nvidia shield ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
219e4b01db
commit
65f20e2daf
6 changed files with 41 additions and 19 deletions
|
|
@ -13,6 +13,7 @@ import com.github.damontecres.wholphin.ui.DefaultItemFields
|
|||
import com.github.damontecres.wholphin.ui.SlimItemFields
|
||||
import com.github.damontecres.wholphin.ui.components.getGenreImageMap
|
||||
import com.github.damontecres.wholphin.ui.main.settings.Library
|
||||
import com.github.damontecres.wholphin.ui.main.settings.favoriteOptions
|
||||
import com.github.damontecres.wholphin.ui.toBaseItems
|
||||
import com.github.damontecres.wholphin.ui.toServerString
|
||||
import com.github.damontecres.wholphin.util.GetGenresRequestHandler
|
||||
|
|
@ -511,7 +512,11 @@ class HomeSettingsService
|
|||
}
|
||||
|
||||
is HomeRowConfig.Favorite -> {
|
||||
val name = context.getString(R.string.favorites) // TODO "Favorite <type>"
|
||||
val name =
|
||||
context.getString(
|
||||
R.string.favorite_items,
|
||||
context.getString(favoriteOptions[config.kind]!!),
|
||||
)
|
||||
HomeRowConfigDisplay(id, name, config)
|
||||
}
|
||||
|
||||
|
|
@ -785,6 +790,11 @@ class HomeSettingsService
|
|||
}
|
||||
|
||||
is HomeRowConfig.Favorite -> {
|
||||
val title =
|
||||
context.getString(
|
||||
R.string.favorite_items,
|
||||
context.getString(favoriteOptions[row.kind]!!),
|
||||
)
|
||||
if (row.kind == BaseItemKind.PERSON) {
|
||||
val request =
|
||||
GetPersonsRequest(
|
||||
|
|
@ -801,7 +811,7 @@ class HomeSettingsService
|
|||
.map { BaseItem(it, true) }
|
||||
.let {
|
||||
Success(
|
||||
context.getString(R.string.favorites), // TODO
|
||||
title,
|
||||
it,
|
||||
row.viewOptions,
|
||||
)
|
||||
|
|
@ -822,7 +832,7 @@ class HomeSettingsService
|
|||
.map { BaseItem(it, row.viewOptions.useSeries) }
|
||||
.let {
|
||||
Success(
|
||||
context.getString(R.string.favorites), // TODO
|
||||
title,
|
||||
it,
|
||||
row.viewOptions,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue