Misc small improvements.
All checks were successful
Build & Test / Main (push) Successful in 1m0s

This commit is contained in:
2024-03-29 18:40:33 -07:00
parent 9e6abb1112
commit 4d5dcc46d2
2 changed files with 19 additions and 20 deletions

View File

@@ -148,9 +148,9 @@ type update struct {
type stopIndicator struct{}
func (m Model) refresh() tea.Msg {
ctx, cancel := context.WithDeadline(
ctx, cancel := context.WithTimeout(
context.Background(),
time.Now().Add(refreshDeadline))
refreshTimeout)
defer cancel()
err := m.math.Refresh(ctx)
if err != nil {
@@ -183,7 +183,7 @@ func (m Model) stopIndicator() tea.Cmd {
}
var refreshInterval = time.Second * 30
var refreshDeadline = time.Second * 15
var refreshTimeout = time.Second * 15
var stopIndicatorDelay = time.Millisecond * 500
func refillProperties(m *Model) {