diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-06-02 00:43:56 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-06-02 00:43:56 +0300 |
commit | 134604edce935a0017b50c16687429e0b25248e6 (patch) | |
tree | ee0288388c84c54e060b2e29fe390ae163c1c962 /ui/room-view.go | |
parent | 7868bd90fab77faa1e37674d543eefc1ff315fff (diff) |
Add ui toggle for image rendering
Diffstat (limited to 'ui/room-view.go')
-rw-r--r-- | ui/room-view.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/room-view.go b/ui/room-view.go index fc2a049..efd144d 100644 --- a/ui/room-view.go +++ b/ui/room-view.go @@ -32,6 +32,7 @@ import ( "maunium.net/go/gomuks/ui/widget" "maunium.net/go/tcell" "maunium.net/go/tview" + "maunium.net/go/gomuks/config" ) type RoomView struct { @@ -46,6 +47,7 @@ type RoomView struct { Room *rooms.Room parent *MainView + config *config.Config typing []string @@ -66,6 +68,7 @@ func NewRoomView(parent *MainView, room *rooms.Room) *RoomView { input: widget.NewAdvancedInputField(), Room: room, parent: parent, + config: parent.config, } view.content = NewMessageView(view) @@ -202,7 +205,7 @@ func (view *RoomView) Draw(screen tcell.Screen) { statusRow = contentRow + contentHeight inputRow = statusRow + StatusBarHeight ) - if view.parent.hideUserList { + if view.config.Preferences.HideUserList { contentWidth = width } @@ -210,7 +213,7 @@ func (view *RoomView) Draw(screen tcell.Screen) { view.topic.SetRect(x, topicRow, width, TopicBarHeight) view.content.SetRect(x, contentRow, contentWidth, contentHeight) view.status.SetRect(x, statusRow, width, StatusBarHeight) - if !view.parent.hideUserList && userListColumn > x { + if !view.config.Preferences.HideUserList && userListColumn > x { view.userList.SetRect(userListColumn, contentRow, UserListWidth, contentHeight) view.ulBorder.SetRect(userListBorderColumn, contentRow, UserListBorderWidth, contentHeight) } @@ -223,7 +226,7 @@ func (view *RoomView) Draw(screen tcell.Screen) { view.status.SetText(view.GetStatus()) view.status.Draw(screen) view.input.Draw(screen) - if !view.parent.hideUserList { + if !view.config.Preferences.HideUserList { view.ulBorder.Draw(screen) view.userList.Draw(screen) } |