From dd63d32d622e5d68f5fce22db3bca6a6e7016f46 Mon Sep 17 00:00:00 2001 From: evan Date: Fri, 25 May 2018 00:12:22 -0500 Subject: [PATCH] fix room name overwriting unread count --- ui/tag-room-list.go | 5 +++-- 1 file 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 {