ShowWarning displays a warning message temporarily.
(message string)
| 134 | |
| 135 | // ShowWarning displays a warning message temporarily. |
| 136 | func (h *Header) ShowWarning(message string) { |
| 137 | h.mu.Lock() |
| 138 | h.isLoading = false |
| 139 | if h.loadingCancel != nil { |
| 140 | h.loadingCancel() |
| 141 | h.loadingCancel = nil |
| 142 | } |
| 143 | h.mu.Unlock() |
| 144 | h.StopLoading() |
| 145 | h.SetText(theme.ReplaceSemanticTags("[warning]⚠ " + message + "[-]")) |
| 146 | |
| 147 | // Clear the message after 3 seconds |
| 148 | h.clearMessageAfterDelay(3 * time.Second) |
| 149 | } |
| 150 | |
| 151 | // formatProfileText creates the formatted header text for a profile. |
| 152 | func (h *Header) formatProfileText(profileName string) string { |
nothing calls this directly
no test coverage detected