mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -08:00
refactor(category-view): improve category selection logic and update error view titles for better localization
This commit is contained in:
1 parent
34864b76dd
commit
c1d7a3c155
2 files changed
+7
-3
No files matched your search
@@ -12,7 +12,7 @@
|
||||
</mat-list-item>
|
||||
} @empty {
|
||||
<app-playlist-error-view
|
||||
title="No results"
|
||||
[title]="'PORTALS.EMPTY_LIST_VIEW.TITLE' | translate"
|
||||
[description]="
|
||||
'PORTALS.EMPTY_LIST_VIEW.NO_SEARCH_RESULTS' | translate
|
||||
"
|
||||
|
||||
@@ -24,7 +24,11 @@ export class CategoryViewComponent {
|
||||
|
||||
isSelected(item: XtreamCategory): boolean {
|
||||
const selectedCategory = this.selectedCategoryId();
|
||||
const itemId = Number((item as any).category_id || item.id);
|
||||
return selectedCategory !== null && Number(selectedCategory) === itemId;
|
||||
const itemId = (item as any).category_id ?? item.id;
|
||||
|
||||
return (
|
||||
selectedCategory !== null &&
|
||||
String(selectedCategory) === String(itemId)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user