Invalidate tips when user did an action
This commit is contained in:
parent
fb93f547ab
commit
a05e9bee48
|
@ -200,6 +200,7 @@ private struct NavigationMenuButtons: ViewModifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.hiddenMenuItems = self.displayedCustomMenuItems.map({ $0.viewMode })
|
self.hiddenMenuItems = self.displayedCustomMenuItems.map({ $0.viewMode })
|
||||||
|
MenuCustomizableTip().invalidate(reason: .actionPerformed)
|
||||||
} label: {
|
} label: {
|
||||||
Label {
|
Label {
|
||||||
Text(item.title, comment: "Menu item")
|
Text(item.title, comment: "Menu item")
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import TipKit
|
||||||
import EnvironmentKit
|
import EnvironmentKit
|
||||||
|
import WidgetsKit
|
||||||
|
|
||||||
struct GeneralSectionView: View {
|
struct GeneralSectionView: View {
|
||||||
@Environment(ApplicationState.self) var applicationState
|
@Environment(ApplicationState.self) var applicationState
|
||||||
|
@ -87,6 +89,7 @@ struct GeneralSectionView: View {
|
||||||
Text("settings.title.menuPosition", comment: "Menu position")
|
Text("settings.title.menuPosition", comment: "Menu position")
|
||||||
}
|
}
|
||||||
.onChange(of: self.applicationState.menuPosition) { oldMenuPosition, newMenuPosition in
|
.onChange(of: self.applicationState.menuPosition) { oldMenuPosition, newMenuPosition in
|
||||||
|
MainNavigationTip().invalidate(reason: .actionPerformed)
|
||||||
ApplicationSettingsHandler.shared.set(menuPosition: newMenuPosition, modelContext: modelContext)
|
ApplicationSettingsHandler.shared.set(menuPosition: newMenuPosition, modelContext: modelContext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue