Alphabetically sort rooms.

This commit is contained in:
Danila Fedorin 2019-05-15 20:48:31 -07:00
parent 5bd6124df2
commit 47a684b777

View File

@ -100,7 +100,9 @@ roomGroups jrs = groupBy (homeserver << Tuple.first) jrs
homeserverView : Model -> String -> List (String, JoinedRoom) -> Html Msg homeserverView : Model -> String -> List (String, JoinedRoom) -> Html Msg
homeserverView m hs rs = homeserverView m hs rs =
let 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 in
div [ class "homeserver-wrapper" ] [ h3 [] [ text hs ], roomList ] div [ class "homeserver-wrapper" ] [ h3 [] [ text hs ], roomList ]