Show tips on app launch

This commit is contained in:
Garth Vander Houwen 2025-04-01 09:26:03 -07:00
parent 46bf02c89c
commit ebbe7c2dcc

View file

@ -38,6 +38,8 @@ struct MeshtasticAppleApp: App {
// Wire up router
self.appDelegate.router = appState.router
// Show Tips
try? Tips.resetDatastore()
}
var body: some Scene {
@ -108,12 +110,6 @@ struct MeshtasticAppleApp: App {
}
})
.task {
#if DEBUG
/// Optionally, call `Tips.resetDatastore()` before `Tips.configure()` to reset the state of all tips. This will allow tips to re-appear even after they have been dismissed by the user.
/// This is for testing only, and should not be enabled in release builds.
try? Tips.resetDatastore()
#endif
try? Tips.configure(
[
// Reset which tips have been shown and what parameters have been tracked, useful during testing and for this sample project