Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/webostvremote/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ func (app *myApp) changeFocus(currentFocus, newFocus tview.Primitive) {
}
setSelectable(newFocus, true)
app.SetFocus(newFocus)
app.Draw()
if newFocus, ok := newFocus.(interface {
selectionChanged(int, int)
GetSelection() (int, int)
}); ok {
newFocus.selectionChanged(newFocus.GetSelection())
}
go app.Draw()
}

func (app *myApp) inputCapture(event *tcell.EventKey) *tcell.EventKey {
Expand Down
2 changes: 1 addition & 1 deletion cmd/webostvremote/wselinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ func newSelInfo() *selInfo {
func (s *selInfo) update(str string) {
s.SetText(str)
s.ScrollToBeginning()
app.Draw()
go app.Draw()
}
6 changes: 3 additions & 3 deletions cmd/webostvremote/wtvinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ func (i *tvInfo) monitorTvCurrentInfo(quit chan struct{}) (err error) {
i.foregroundAppInfo = info
i.update()
i.Unlock()
app.Draw()
defer func() {
go app.Draw()
}()

if startChannelMonitor {
app.logger.Debug("starting channel monitor")
Expand All @@ -138,7 +140,6 @@ func (i *tvInfo) monitorTvCurrentInfo(quit chan struct{}) (err error) {
i.tvCurrentChannel = webostv.TvCurrentChannel{}
i.update()
i.Unlock()
app.Draw()
if err != nil {
return err
}
Expand Down Expand Up @@ -174,7 +175,6 @@ func (i *tvInfo) monitorTvCurrentChannel(quit chan struct{}) (err error) {
i.tvCurrentChannel = cur
i.update()
i.Unlock()
app.Draw()
return nil
}, quit)

Expand Down
2 changes: 1 addition & 1 deletion cmd/webostvremote/wvolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func newVolume() *volume {

func (v *volume) update(volume int) {
v.SetPercent(volume)
app.Draw()
go app.Draw()
}

func (v *volume) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive)) {
Expand Down