ui: inline onMessageTextViewChanged handler

This commit is contained in:
rigormorrtiss 2021-08-10 23:20:37 +04:00
parent ddbb051c84
commit 12ac9072b3

View file

@ -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()
}
}