From 12ac9072b3f14e2847b7d8e99b11c3525d71d419 Mon Sep 17 00:00:00 2001 From: rigormorrtiss Date: Tue, 10 Aug 2021 23:20:37 +0400 Subject: [PATCH] ui: inline onMessageTextViewChanged handler --- ui/textviews.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ui/textviews.go b/ui/textviews.go index 0830948..346c909 100644 --- a/ui/textviews.go +++ b/ui/textviews.go @@ -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() - } -}