Skip to content

Commit

Permalink
fixed scrolling deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Andre Birkedal committed Sep 7, 2020
1 parent a286bf7 commit b345228
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 3 additions & 2 deletions ui/select_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ func (v *View) inputDone(key tcell.Key, resultStrs []string, input *tview.InputF
func (v *View) showChannelSelector() {
input := tview.NewInputField().
SetPlaceholder("Select channel").
SetFieldBackgroundColor(tcell.ColorGold).
SetFieldTextColor(tcell.ColorBlack)
SetFieldBackgroundColor(tcell.ColorBlack).
SetFieldTextColor(tcell.ColorWhite)
//SetFieldTextColor(tcell.ColorBlack).SetFieldTextColor(tcell.ColorBlack)

input.SetAutocompleteFunc(
func(currentText string) []string {
Expand Down
8 changes: 2 additions & 6 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,14 @@ func (v *View) Start() {
channelName := v.GetCurrentChannel()
_, channel := v.getChannelByName(channelName)

v.app.QueueUpdateDraw(func() {
channel.Scroll(-10)
})
channel.Scroll(-10)
}

if event.Key() == tcell.KeyPgDn {
channelName := v.GetCurrentChannel()
_, channel := v.getChannelByName(channelName)

v.app.QueueUpdateDraw(func() {
channel.Scroll(10)
})
channel.Scroll(10)
}

return event
Expand Down

0 comments on commit b345228

Please sign in to comment.