From 7d758898dc907b8643bab6ae2e70c3ca2a021fac Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Jun 2023 11:12:02 +0200 Subject: Alphabetical order for channels filter --- .../src/app/+my-library/my-videos/my-videos.component.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'client/src/app/+my-library') diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts index b618b3f88..57b8bdf7d 100644 --- a/client/src/app/+my-library/my-videos/my-videos.component.ts +++ b/client/src/app/+my-library/my-videos/my-videos.component.ts @@ -105,12 +105,14 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook { this.user = this.authService.getUser() this.userChannels = this.user.videoChannels - const channelFilters = this.userChannels.map(c => { - return { - value: 'channel:' + c.name, - label: c.displayName - } - }) + const channelFilters = [ ...this.userChannels ] + .sort((a, b) => a.displayName.localeCompare(b.displayName)) + .map(c => { + return { + value: 'channel:' + c.name, + label: c.displayName + } + }) this.inputFilters = [ { -- cgit v1.2.3