ui: inline onMessageTextViewChanged handler
This commit is contained in:
parent
ddbb051c84
commit
12ac9072b3
1 changed files with 3 additions and 7 deletions
|
|
@ -13,16 +13,12 @@ func NewMessagesTextView(app *tview.Application, theme *util.Theme) *tview.TextV
|
|||
SetDynamicColors(true).
|
||||
SetWordWrap(true).
|
||||
ScrollToEnd().
|
||||
SetChangedFunc(onMessagesTextViewChanged(app)).
|
||||
SetChangedFunc(func() {
|
||||
app.Draw()
|
||||
}).
|
||||
SetBackgroundColor(tcell.GetColor(theme.TextViewBackground)).
|
||||
SetBorder(true).
|
||||
SetBorderPadding(0, 0, 1, 1)
|
||||
|
||||
return messagesTextView
|
||||
}
|
||||
|
||||
func onMessagesTextViewChanged(app *tview.Application) func() {
|
||||
return func() {
|
||||
app.Draw()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue