From 134604edce935a0017b50c16687429e0b25248e6 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 2 Jun 2018 00:43:56 +0300 Subject: Add ui toggle for image rendering --- ui/view-main.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'ui/view-main.go') 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 { -- cgit v1.2.3