forked from Mirrors/gomuks
Move utility functions above mauview interfaces
This commit is contained in:
parent
0af8d507e1
commit
9cecf0bd02
1 changed files with 8 additions and 8 deletions
|
@ -108,6 +108,14 @@ func (rstr *RosterView) getMostRecentMessage(room *rooms.Room) (string, bool) {
|
|||
return "It's quite empty in here.", false
|
||||
}
|
||||
|
||||
func (rstr *RosterView) First() *rooms.Room {
|
||||
return rstr.rooms[0]
|
||||
}
|
||||
|
||||
func (rstr *RosterView) Last() *rooms.Room {
|
||||
return rstr.rooms[len(rstr.rooms)-1]
|
||||
}
|
||||
|
||||
func (rstr *RosterView) Draw(screen mauview.Screen) {
|
||||
if rstr.focused {
|
||||
if roomView, ok := rstr.parent.getRoomView(rstr.selected.ID, true); ok {
|
||||
|
@ -228,11 +236,3 @@ func (rstr *RosterView) OnKeyEvent(event mauview.KeyEvent) bool {
|
|||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (rstr *RosterView) First() *rooms.Room {
|
||||
return rstr.rooms[0]
|
||||
}
|
||||
|
||||
func (rstr *RosterView) Last() *rooms.Room {
|
||||
return rstr.rooms[len(rstr.rooms)-1]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue