UX: orders public channels by slug instead of title (#20188)

Public channels were previously sorted by name, however, channels with a leading emoji in the name would always appear first in the list. By using slug we avoid this issue.
This commit is contained in:
Joffrey JAFFEUX
2023-02-07 10:36:28 +01:00
committed by GitHub
parent 19ff8210bc
commit f4b56ea455
2 changed files with 4 additions and 4 deletions
@@ -99,7 +99,7 @@ export default class ChatChannelsManager extends Service {
(channel) =>
channel.isCategoryChannel && channel.currentUserMembership.following
)
.sort((a, b) => a.title.localeCompare(b.title));
.sort((a, b) => a?.slug?.localeCompare?.(b?.slug));
}
get directMessageChannels() {