Fix updating "MultiSelectListPreference" with non-existing selected values
This commit is contained in:
@@ -61,6 +61,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|||||||
- (**Browse**) Fix showing only nsfw sources in the browse source page when the "show nsfw" setting is disabled
|
- (**Browse**) Fix showing only nsfw sources in the browse source page when the "show nsfw" setting is disabled
|
||||||
- (**Manga/Library**) Fix mark as read/unread option not being disabled for manga without any chapters
|
- (**Manga/Library**) Fix mark as read/unread option not being disabled for manga without any chapters
|
||||||
- (**Manga/Library**) Fix delete/download option not being disabled for manga without any chapters
|
- (**Manga/Library**) Fix delete/download option not being disabled for manga without any chapters
|
||||||
|
- (**Source**) Fix changing configuration settings with multi option selection where a selected option does not exist anymore. (E.g. Komgas "Default libraries" setting, still having a library selected that has been deleted)
|
||||||
|
|
||||||
## [20260509.01] (r3147) - 2026-05-09
|
## [20260509.01] (r3147) - 2026-05-09
|
||||||
|
|
||||||
|
|||||||
@@ -120,16 +120,20 @@ export function MultiSelectListPreference(props: MultiSelectListPreferenceProps)
|
|||||||
}, [currentValue]);
|
}, [currentValue]);
|
||||||
|
|
||||||
const findEntriesOf = (values?: string[] | null) =>
|
const findEntriesOf = (values?: string[] | null) =>
|
||||||
values?.map((value) => {
|
values
|
||||||
|
?.map((value) => {
|
||||||
const idx = entryValues.indexOf(value);
|
const idx = entryValues.indexOf(value);
|
||||||
return entries[idx];
|
return entries[idx];
|
||||||
}) ?? [];
|
})
|
||||||
|
.filter((value) => typeof value === 'string') ?? [];
|
||||||
|
|
||||||
const findEntryValuesOf = (values?: string[] | null) =>
|
const findEntryValuesOf = (values?: string[] | null) =>
|
||||||
values?.map((value) => {
|
values
|
||||||
|
?.map((value) => {
|
||||||
const idx = entries.indexOf(value);
|
const idx = entries.indexOf(value);
|
||||||
return entryValues[idx];
|
return entryValues[idx];
|
||||||
}) ?? [];
|
})
|
||||||
|
.filter((value) => typeof value === 'string') ?? [];
|
||||||
|
|
||||||
const getSummary = () => summary;
|
const getSummary = () => summary;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user