diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-05-16 21:06:50 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-05-16 21:06:50 +0300 |
commit | a8a4c72d14027afa669fd7c85ea3a48bde8a3924 (patch) | |
tree | 16edbb59c5d1740f62f3bde460c414cd7ec7a7e5 | |
parent | 8a3fbc24ab430443b89dfa45e726ab96ad3ea1ec (diff) |
Show per-tag room count in room list
-rw-r--r-- | ui/room-list.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/room-list.go b/ui/room-list.go index 6905d0e..268666d 100644 --- a/ui/room-list.go +++ b/ui/room-list.go @@ -672,7 +672,9 @@ func (list *RoomList) Draw(screen tcell.Screen) { } } - widget.WriteLine(screen, tview.AlignLeft, tagDisplayName, x, y, width, tcell.StyleDefault.Underline(true).Bold(true)) + roomCount := strconv.Itoa(tagRoomList.TotalLength()) + widget.WriteLine(screen, tview.AlignLeft, tagDisplayName, x, y, width-1-len(roomCount), tcell.StyleDefault.Underline(true).Bold(true)) + widget.WriteLine(screen, tview.AlignLeft, roomCount, x+len(tagDisplayName)+1, y, width-2-len(tagDisplayName), tcell.StyleDefault.Italic(true)) items := tagRoomList.Visible() |