This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user