From 47a684b7777597424c26b2a72f8e7694c081f0ad Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 15 May 2019 20:48:31 -0700 Subject: [PATCH] Alphabetically sort rooms. --- src/Scylla/Views.elm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Scylla/Views.elm b/src/Scylla/Views.elm index bc9a77e..e2eb810 100644 --- a/src/Scylla/Views.elm +++ b/src/Scylla/Views.elm @@ -100,7 +100,9 @@ roomGroups jrs = groupBy (homeserver << Tuple.first) jrs homeserverView : Model -> String -> List (String, JoinedRoom) -> Html Msg homeserverView m hs rs = let - roomList = div [ class "rooms-list" ] <| List.map (\(rid, r) -> roomListElementView m rid r) rs + roomList = div [ class "rooms-list" ] + <| List.map (\(rid, r) -> roomListElementView m rid r) + <| List.sortBy (\(rid, r) -> roomDisplayName m r) rs in div [ class "homeserver-wrapper" ] [ h3 [] [ text hs ], roomList ]