Skip to content

Commit 68fc5c3

Browse files
committed
Add loading icon for suggestions
1 parent d72fbf3 commit 68fc5c3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/Shared/Im/View/Profile.purs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ compactProfile contact model =
109109
where
110110
contextMenu =
111111
( if not model.user.ownBackground && DM.isJust contact.user.chatBackground then
112-
[HE.div [ HA.class' "user-menu-item menu-item-heading", HA.onClick RemoveChatBackground ] [ HE.text "Remove chat background" ]]
112+
[ HE.div [ HA.class' "user-menu-item menu-item-heading", HA.onClick RemoveChatBackground ] [ HE.text "Remove chat background" ] ]
113113
else
114114
[]
115115
) <> profileContextMenu contact.user.id true
@@ -337,10 +337,14 @@ suggestionCards model =
337337
uncheck p = HE.div_ [ HE.text $ "" <> show p ]
338338

339339
moreCards =
340-
[ HE.div (HA.class' "card card-load-more" : if model.freeToFetchSuggestions then [ HA.onClick FetchMoreSuggestions ] else [])
341-
[ HE.i_ [ HE.text "Load more suggestions" ]
342-
, nextArrow
343-
]
340+
[ if model.freeToFetchSuggestions then
341+
HE.div [ HA.class' "card card-load-more", HA.onClick FetchMoreSuggestions ]
342+
[ HE.i_ [ HE.text "Load more suggestions" ]
343+
, nextArrow
344+
]
345+
else
346+
HE.div [ HA.class' "card card-load-more" ]
347+
[ HE.div' [ HA.class' "loading" ] ]
344348
]
345349
card suggestion =
346350
HE.div [ HA.class' { "card": true, "backing-card": suggestion.id == backerId } ]

0 commit comments

Comments
 (0)