forked from Mirrors/gomuks
Add Bump implementation to roster view
This commit is contained in:
parent
22acad8287
commit
7a83ebd7f4
2 changed files with 6 additions and 0 deletions
|
@ -409,6 +409,7 @@ func sendNotification(room *rooms.Room, sender, text string, critical, sound boo
|
|||
|
||||
func (view *MainView) Bump(room *rooms.Room) {
|
||||
view.roomList.Bump(room)
|
||||
view.rosterView.Bump(room)
|
||||
}
|
||||
|
||||
func (view *MainView) NotifyMessage(room *rooms.Room, message ifc.Message, should pushrules.PushActionArrayShould) {
|
||||
|
|
|
@ -91,6 +91,11 @@ func (rstr *RosterView) Remove(room *rooms.Room) {
|
|||
rstr.rooms = rstr.rooms[:last]
|
||||
}
|
||||
|
||||
func (rstr *RosterView) Bump(room *rooms.Room) {
|
||||
rstr.Remove(room)
|
||||
rstr.Add(room)
|
||||
}
|
||||
|
||||
func (rstr *RosterView) index(room *rooms.Room) int {
|
||||
rstr.Lock()
|
||||
defer rstr.Unlock()
|
||||
|
|
Loading…
Add table
Reference in a new issue