Contents

resetEligibility()

Reset a previously invalidated tip.

Declaration

func resetEligibility() async

Overview

By default tips that are invalidated will never become eligible for display. This prevents tips about already discovered features from appearing. Resetting a tip changes its status back to .pending or .available and makes it re-eligible for display.

struct CatTrackSettings: View {
    var body: some View {
        VStack {
            LocationSettings()
            MapSettings()

            Button("Reset Map Tips") {
                Task {
                    let reorientMapTip = ReorientMapTip()
                    await reorientMapTip.resetEligibility()

                    let compassMapTip = CompassMapTip()
                    await compassMapTip.resetEligibility()
                }
            }
        }
    }
}

See Also

Invalidating a tip