refactor: some improvements in interfaces

This commit is contained in:
4gray committed 2023-08-09 22:58:25 +02:00
1 parent ff90a66c32
commit 9044fe4b61
2 files changed
+9 -6

No files matched your search

+4 -1
View File
@@ -1,7 +1,10 @@
import { StalkerPortalActions } from '../../../shared/stalker-portal-actions.enum';
import { XtreamCodeActions } from '../../../shared/xtream-code-actions';
export type PortalActions = StalkerPortalActions | XtreamCodeActions;
export interface Breadcrumb {
action: XtreamCodeActions;
action: PortalActions;
title: string;
category_id?: string;
}
@@ -55,7 +55,7 @@ import {
import { PlaylistsService } from '../services/playlists.service';
import { Settings, VideoPlayer } from '../settings/settings.interface';
import { STORE_KEY } from '../shared/enums/store-keys.enum';
import { Breadcrumb } from './breadcrumb.interface';
import { Breadcrumb, PortalActions } from './breadcrumb.interface';
import { ContentTypeNavigationItem } from './content-type-navigation-item.interface';
import { PlayerDialogComponent } from './player-dialog/player-dialog.component';
import { PortalStore } from './portal.store';
@@ -164,15 +164,15 @@ export class XtreamMainContainerComponent implements OnInit {
effect(() => {
if (this.currentPlaylist()) {
this.getCategories(this.selectedContentType);
this.favorites$ = this.playlistService.getPortalFavorites(
this.currentPlaylist()._id
);
}
});
}
ngOnInit() {
this.setInitialBreadcrumb();
this.favorites$ = this.playlistService.getPortalFavorites(
this.currentPlaylist()._id
);
this.commandsList.forEach((command) => {
if (this.dataService.isElectron) {
@@ -363,7 +363,7 @@ export class XtreamMainContainerComponent implements OnInit {
});
}
getLayoutViewBasedOnAction(action: XtreamCodeActions) {
getLayoutViewBasedOnAction(action: PortalActions) {
let result: LayoutView = 'category';
switch (action) {
case XtreamCodeActions.GetLiveCategories: