refactor: replace lodash import with specific groupBy function for improved performance

This commit is contained in:
4gray committed 2026-02-08 20:23:48 +01:00
1 parent 90e4602530
commit 3e7c58b049
1 file changed
+5 -4
@@ -14,7 +14,7 @@ import { MatTabsModule } from '@angular/material/tabs';
import { Store } from '@ngrx/store';
import { StorageMap } from '@ngx-pwa/local-storage';
import { TranslatePipe } from '@ngx-translate/core';
import * as _ from 'lodash';
import groupBy from 'lodash/groupBy';
import {
ChannelActions,
FavoritesActions,
@@ -91,8 +91,9 @@ export class ChannelListContainerComponent implements OnInit, OnDestroy {
}
/** Active playlist ID as signal */
private readonly activePlaylistIdSignal =
this.store.selectSignal(selectActivePlaylistId);
private readonly activePlaylistIdSignal = this.store.selectSignal(
selectActivePlaylistId
);
/** Displayed channels - filters out unfavorited channels in global favorites view */
readonly displayedChannels = computed(() => {
@@ -105,7 +106,7 @@ export class ChannelListContainerComponent implements OnInit, OnDestroy {
/** Object with channels sorted by groups */
readonly groupedChannels = computed(() =>
_.default.groupBy(this.displayedChannels(), 'group.title')
groupBy(this.displayedChannels(), 'group.title')
);
/** Selected channel */