aboutsummaryrefslogtreecommitdiff
path: root/ui/view-main.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-06-02 00:43:56 +0300
committerTulir Asokan <tulir@maunium.net>2018-06-02 00:43:56 +0300
commit134604edce935a0017b50c16687429e0b25248e6 (patch)
treeee0288388c84c54e060b2e29fe390ae163c1c962 /ui/view-main.go
parent7868bd90fab77faa1e37674d543eefc1ff315fff (diff)
Add ui toggle for image rendering
Diffstat (limited to 'ui/view-main.go')
-rw-r--r--ui/view-main.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/ui/view-main.go b/ui/view-main.go
index 785fb44..b83187e 100644
--- a/ui/view-main.go
+++ b/ui/view-main.go
@@ -50,14 +50,9 @@ type MainView struct {
gmx ifc.Gomuks
config *config.Config
parent *GomuksUI
-
- hideUserList bool
- hideRoomList bool
- bareMessages bool
}
func (ui *GomuksUI) NewMainView() tview.Primitive {
- prefs := ui.gmx.Config().Preferences
mainView := &MainView{
Flex: tview.NewFlex(),
roomList: NewRoomList(),
@@ -68,10 +63,6 @@ func (ui *GomuksUI) NewMainView() tview.Primitive {
gmx: ui.gmx,
config: ui.gmx.Config(),
parent: ui,
-
- hideUserList: prefs.HideUserList,
- hideRoomList: prefs.HideRoomList,
- bareMessages: prefs.BareMessageView,
}
mainView.cmdProcessor = NewCommandProcessor(mainView)
@@ -88,7 +79,7 @@ func (ui *GomuksUI) NewMainView() tview.Primitive {
}
func (view *MainView) Draw(screen tcell.Screen) {
- if view.hideRoomList {
+ if view.config.Preferences.HideRoomList {
view.roomView.SetRect(view.GetRect())
view.roomView.Draw(screen)
} else {