MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / ShowLoading

Method ShowLoading

internal/ui/components/header.go:60–78  ·  view source on GitHub ↗

ShowLoading displays an animated loading indicator.

(message string)

Source from the content-addressed store, hash-verified

58
59// ShowLoading displays an animated loading indicator.
60func (h *Header) ShowLoading(message string) {
61 h.mu.Lock()
62 if h.isLoading && h.loadingText == message {
63 h.mu.Unlock()
64 return
65 }
66
67 if h.isLoading && h.loadingCancel != nil {
68 h.loadingCancel()
69 }
70
71 h.isLoading = true
72 h.loadingText = message
73 ctx, cancel := context.WithCancel(context.Background())
74 h.loadingCancel = cancel
75 h.mu.Unlock()
76
77 go h.animateLoading(ctx)
78}
79
80// StopLoading stops the loading animation.
81func (h *Header) StopLoading() {

Callers

nothing calls this directly

Calls 1

animateLoadingMethod · 0.95

Tested by

no test coverage detected