diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-05-25 11:29:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-25 11:29:06 +0300 |
commit | a76ce88a30e8c09603350a88827cf24239e8e44a (patch) | |
tree | bcd5cc7a14f41986a81c605e77d3299858a28c67 | |
parent | 1ed786ff5e8fedaf2dc6f9e112eae341fb61fa30 (diff) | |
parent | dd63d32d622e5d68f5fce22db3bca6a6e7016f46 (diff) |
Merge pull request #53 from Evidlo/master
fix room name overwriting unread count
-rw-r--r-- | ui/tag-room-list.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/tag-room-list.go b/ui/tag-room-list.go index dffe3c2..2705c49 100644 --- a/ui/tag-room-list.go +++ b/ui/tag-room-list.go @@ -53,6 +53,9 @@ func (or *OrderedRoom) Draw(roomList *RoomList, screen tcell.Screen, x, y, lineW } unreadCount := or.UnreadCount() + + widget.WriteLinePadded(screen, tview.AlignLeft, or.GetTitle(), x, y, lineWidth, style) + if unreadCount > 0 { unreadMessageCount := "99+" if unreadCount < 100 { @@ -65,8 +68,6 @@ func (or *OrderedRoom) Draw(roomList *RoomList, screen tcell.Screen, x, y, lineW widget.WriteLine(screen, tview.AlignRight, unreadMessageCount, x+lineWidth-7, y, 7, style) lineWidth -= len(unreadMessageCount) } - - widget.WriteLinePadded(screen, tview.AlignLeft, or.GetTitle(), x, y, lineWidth, style) } type TagRoomList struct { |