From f41b7bbd0a0cc731fd7c471b7ee8b26f14a21755 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Thu, 8 May 2025 12:03:59 -0500 Subject: chore: refactoring status updates --- internal/tui/util/util.go | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'internal/tui/util') diff --git a/internal/tui/util/util.go b/internal/tui/util/util.go index 2707009b3..207382d1e 100644 --- a/internal/tui/util/util.go +++ b/internal/tui/util/util.go @@ -1,8 +1,6 @@ package util import ( - "time" - tea "github.com/charmbracelet/bubbletea" ) @@ -12,44 +10,6 @@ func CmdHandler(msg tea.Msg) tea.Cmd { } } -func ReportError(err error) tea.Cmd { - return CmdHandler(InfoMsg{ - Type: InfoTypeError, - Msg: err.Error(), - }) -} - -type InfoType int - -const ( - InfoTypeInfo InfoType = iota - InfoTypeWarn - InfoTypeError -) - -func ReportInfo(info string) tea.Cmd { - return CmdHandler(InfoMsg{ - Type: InfoTypeInfo, - Msg: info, - }) -} - -func ReportWarn(warn string) tea.Cmd { - return CmdHandler(InfoMsg{ - Type: InfoTypeWarn, - Msg: warn, - }) -} - -type ( - InfoMsg struct { - Type InfoType - Msg string - TTL time.Duration - } - ClearStatusMsg struct{} -) - func Clamp(v, low, high int) int { if high < low { low, high = high, low -- cgit v1.2.3