stream-settings: Sort folders in dropdown by name.

Folders shown in dropdown are now sorted by name instead of ID.
This commit is contained in:
Sahil Batra
2025-07-30 11:35:07 +05:30
committed by Tim Abbott
parent f273e39939
commit df5669d546

View File

@@ -2006,7 +2006,9 @@ export function get_group_assigned_user_group_permissions(group: UserGroup): {
export function set_up_folder_dropdown_widget(sub?: StreamSubscription): DropdownWidget {
const folder_options = (): dropdown_widget.Option[] => {
const folders = channel_folders.get_channel_folders();
const folders = channel_folders
.get_channel_folders()
.sort((a, b) => util.strcmp(a.name.toLowerCase(), b.name.toLowerCase()));
const options: dropdown_widget.Option[] = folders.map((folder) => ({
name: folder.name,
unique_id: folder.id,