aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-06-15 17:51:36 +0300
committerTulir Asokan <tulir@maunium.net>2019-06-15 17:51:36 +0300
commit0f08c49df40f77e90e4b5ef7604c74631065faa3 (patch)
treefaaf36bfa7dd891b50bb7fcb01ff738353a034d2 /ui
parent160b035c4d5b88516cb4d1f4e26ec2e2e0262bcc (diff)
Fix bumping unloaded rooms in room list when receiving messages
Diffstat (limited to 'ui')
-rw-r--r--ui/view-main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/view-main.go b/ui/view-main.go
index 5d2e1f9..ea24644 100644
--- a/ui/view-main.go
+++ b/ui/view-main.go
@@ -387,8 +387,12 @@ func sendNotification(room *rooms.Room, sender, text string, critical, sound boo
notification.Send(sender, text, critical, sound)
}
-func (view *MainView) NotifyMessage(room *rooms.Room, message ifc.Message, should pushrules.PushActionArrayShould) {
+func (view *MainView) Bump(room *rooms.Room) {
view.roomList.Bump(room)
+}
+
+func (view *MainView) NotifyMessage(room *rooms.Room, message ifc.Message, should pushrules.PushActionArrayShould) {
+ view.Bump(room)
uiMsg, ok := message.(*messages.UIMessage)
if ok && uiMsg.SenderID == view.config.UserID {
return