MCPcopy Create free account
hub / github.com/basecamp/hey-cli / Update

Method Update

internal/tui/tui.go:81–125  ·  view source on GitHub ↗

--- Update ---

(msg tea.Msg)

Source from the content-addressed store, hash-verified

79 // the stream open. It outlives the view context, which a mail account switch throws
80 // away — the changes stream is the same one whichever account is being read.
81 watchMail MailWatcher
82 mailWatchEvents <-chan MailWatchEvent
83 mailWatchAttempt uint64
84 mailWatchFailures int
85 mailWatchStatus mailWatchStatus
86 mailWatchReason string
87 watchCtx context.Context
88 stopWatching context.CancelFunc
89
90 // The Screener's stream, which can only be opened once HEY has served its name, and
91 // the context that holds it open. Cancelling that context is how the stream behind an
92 // old name is given up, so a new one does not stack on top of it.
93 watchScreener ScreenerWatcher
94 screenerChanges <-chan struct{}
95 screenerStream string
96 stopScreenerWatch context.CancelFunc
97 screenerRefreshDue bool
98
99 // The calendar's streams, followed only while the calendar or the journal is on
100 // screen: every other section re-reads its data on entry, so a doorbell rung for a
101 // section nobody is looking at would be paid for and answered by nothing.
102 watchCalendar CalendarWatcher
103 calendarChanges <-chan struct{}
104 calendarWatchAttempt uint64
105 calendarWatchFailures int
106 stopCalendarWatch context.CancelFunc
107 calendarRefreshDue bool
108
109 // Linked mail accounts
110 mailAccounts []mailAccountChoice
111 mailAccountsLoaded bool
112 mailSourcesLoaded bool
113 mailAccount mailAccountChoice
114 mailAccountCursor int
115 mailAccountPicker bool
116 mailAccountSwitching bool
117 mailAccountUnavailable bool
118 mailAccountDiscoveryErr string
119 mailAccountErr string
120 mailAccountRequestID uint64
121 viewGeneration uint64
122 viewGenerationToken *atomic.Uint64
123
124 // What just happened, in the top right corner until its clock runs out
125 toast notifyMsg
126 toastID uint64
127
128 // Loading & error

Callers

nothing calls this directly

Calls 8

updateHelpBindingsMethod · 0.95
handleKeyMethod · 0.95
syncLoadingMethod · 0.95
spinnerTickFunction · 0.85
heightMethod · 0.80
setWidthMethod · 0.80
ResizeMethod · 0.65
UpdateMethod · 0.65

Tested by

no test coverage detected