github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/internal/hud/webview/analytics_nudge.go (about) 1 package webview 2 3 import ( 4 "github.com/tilt-dev/wmclient/pkg/analytics" 5 6 "github.com/tilt-dev/tilt/internal/store" 7 ) 8 9 func NeedsNudge(st store.EngineState) bool { 10 if st.AnalyticsEffectiveOpt() != analytics.OptDefault { 11 // already opted in/out 12 return false 13 } 14 15 manifestTargs := st.ManifestTargets 16 if len(manifestTargs) == 0 { 17 return false 18 } 19 20 for _, targ := range manifestTargs { 21 if !targ.State.LastSuccessfulDeployTime.IsZero() { 22 return true 23 } 24 } 25 return false 26 }