Remove "local source" from source languages filter
The "local source" can't be hidden and therefore should not be shown in the filter
This commit is contained in:
@@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
### Fixed
|
||||
- (**Library**) Fix total library size chip color in light mode
|
||||
- (**Browse**) Fix missing pinned sources in the source language filter
|
||||
- (**Browse**) Fix incorrectly showing "local source" source in the source language filter (the local source can't be disabled)
|
||||
|
||||
## [20251230.01] (r2937) - 2025-12-30
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ export function Sources({ tabsMenuHeight }: { tabsMenuHeight: number }) {
|
||||
() =>
|
||||
SourceService.filter(sources ?? [], {
|
||||
showNsfw,
|
||||
keepLocalSource: false,
|
||||
removeLocalSource: true,
|
||||
}),
|
||||
[sources],
|
||||
);
|
||||
|
||||
@@ -98,12 +98,14 @@ export class Sources {
|
||||
keepLocalSource,
|
||||
pinned,
|
||||
enabled,
|
||||
removeLocalSource,
|
||||
}: {
|
||||
showNsfw?: boolean;
|
||||
languages?: string[];
|
||||
keepLocalSource?: boolean;
|
||||
pinned?: boolean;
|
||||
enabled?: boolean;
|
||||
removeLocalSource?: boolean;
|
||||
} = {},
|
||||
): Source[] {
|
||||
const normalizedLanguages = toComparableLanguages(toUniqueLanguageCodes(languages ?? []));
|
||||
@@ -135,7 +137,8 @@ export class Sources {
|
||||
!enabled ||
|
||||
getSourceMetadata(source).isEnabled ||
|
||||
(keepLocalSource && Sources.isLocalSource(source)),
|
||||
);
|
||||
)
|
||||
.filter((source) => !removeLocalSource || !Sources.isLocalSource(source));
|
||||
}
|
||||
|
||||
static areFromMultipleRepos<Source extends SourceIdInfo & SourceRepoInfo>(sources: Source[]): boolean {
|
||||
|
||||
Reference in New Issue
Block a user