From 64d244cfcb4aeeacb114cb9279640a5ebceab264 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 30 May 2026 13:59:05 +0200 Subject: [PATCH] Refactor: extract private setAppStatusContent helper method --- pkg/gui/controllers/helpers/app_status_helper.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/gui/controllers/helpers/app_status_helper.go b/pkg/gui/controllers/helpers/app_status_helper.go index fa402962c..e1915f027 100644 --- a/pkg/gui/controllers/helpers/app_status_helper.go +++ b/pkg/gui/controllers/helpers/app_status_helper.go @@ -140,9 +140,7 @@ func (self *AppStatusHelper) renderAppStatusSync(stop chan struct{}) { for { select { case <-ticker.C: - appStatus, color := self.statusMgr().GetStatusString(self.c.UserConfig()) - self.c.Views().AppStatus.FgColor = color - self.c.SetViewContent(self.c.Views().AppStatus, appStatus) + self.setAppStatusContent() // Redraw all views of the bottom line: bottomLineViews := []*gocui.View{ self.c.Views().AppStatus, self.c.Views().Options, self.c.Views().Information, @@ -155,3 +153,9 @@ func (self *AppStatusHelper) renderAppStatusSync(stop chan struct{}) { } }() } + +func (self *AppStatusHelper) setAppStatusContent() { + appStatus, color := self.statusMgr().GetStatusString(self.c.UserConfig()) + self.c.Views().AppStatus.FgColor = color + self.c.SetViewContent(self.c.Views().AppStatus, appStatus) +}