Proyecto App Windows

This commit is contained in:
2026-05-03 23:36:48 +02:00
commit 96793b2e1e
1248 changed files with 189750 additions and 0 deletions
@@ -0,0 +1,38 @@
import { on } from '@ngrx/store';
import { Channel } from 'shared-interfaces';
import { ChannelActions } from '../actions';
import { PlaylistState } from '../state';
export const channelReducers = [
on(ChannelActions.setChannelsLoading, (state, action): PlaylistState => {
return {
...state,
channelsLoading: action.loading,
};
}),
on(
ChannelActions.setActiveChannelSuccess,
(state, action): PlaylistState => {
const { channel } = action;
return {
...state,
active: { ...channel, epgParams: '' } as Channel,
activePlaybackUrl: null,
};
}
),
on(ChannelActions.resetActiveChannel, (state): PlaylistState => {
return {
...state,
active: undefined,
activePlaybackUrl: null,
};
}),
on(ChannelActions.setChannels, (state, action): PlaylistState => {
return {
...state,
channelsLoading: false,
channels: action.channels,
};
}),
];