Tighten verbose comments in Wails UI Go code

Shorten over-long godoc/inline comments across the client/ui tray and
services code: drop narrative restatement, legacy-Fyne tangents, and text
already evident from signatures and names. Keep only the non-obvious why
(concurrency/lock ordering, platform quirks, ordering constraints, the
profile-switch state table). No code changes.
This commit is contained in:
Zoltan Papp
2026-06-13 00:22:27 +02:00
parent c2b43b9cf0
commit edf7e2d04d
58 changed files with 972 additions and 2156 deletions
+2 -9
View File
@@ -9,10 +9,8 @@ import (
"github.com/netbirdio/netbird/client/ui/preferences"
)
// Preferences is the Wails-bound facade over preferences.Store. The store
// itself owns persistence and the subscription channel; this type just
// re-exposes Get and SetLanguage with the context.Context-first signature
// the Wails binding generator wants.
// Preferences is the Wails-bound facade over preferences.Store; the context.Context-first
// signatures are what the binding generator requires.
type Preferences struct {
store *preferences.Store
}
@@ -21,23 +19,18 @@ func NewPreferences(store *preferences.Store) *Preferences {
return &Preferences{store: store}
}
// Get returns the current user-scope preferences.
func (s *Preferences) Get(_ context.Context) (preferences.UIPreferences, error) {
return s.store.Get(), nil
}
// SetLanguage validates and persists a new UI language.
func (s *Preferences) SetLanguage(_ context.Context, lang i18n.LanguageCode) error {
return s.store.SetLanguage(lang)
}
// SetViewMode validates and persists the Main-window view choice
// ("default" or "advanced").
func (s *Preferences) SetViewMode(_ context.Context, mode preferences.ViewMode) error {
return s.store.SetViewMode(mode)
}
// SetOnboardingCompleted persists the welcome-flow dismissal flag.
func (s *Preferences) SetOnboardingCompleted(_ context.Context, done bool) error {
return s.store.SetOnboardingCompleted(done)
}