mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
fix modifier uses
fix addeventview not compiling
This commit is contained in:
@@ -14,4 +14,4 @@ BUNDLE_ID_WIDGETS = com.neon443.NearFuture.widgets
|
||||
GROUP_ID = group.NearFuture
|
||||
VERSION = 5
|
||||
NAME = Near Future
|
||||
BUILD_NUMBER = 18
|
||||
BUILD_NUMBER = 27
|
||||
|
||||
@@ -54,7 +54,7 @@ struct ContentView: View {
|
||||
}
|
||||
.tag(Tab.settings)
|
||||
}
|
||||
.modifier(hapticHeavy(trigger: tabSelection))
|
||||
.hapticHeavy(trigger: tabSelection)
|
||||
.sheet(isPresented: $settingsModel.settings.showWhatsNew) {
|
||||
WhatsNewView(settingsModel: settingsModel)
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@ struct AddEventView: View {
|
||||
@State var showNeedsNameAlert: Bool = false
|
||||
@State var isSymbolPickerPresented: Bool = false
|
||||
|
||||
@State private var bye: Bool = false
|
||||
|
||||
@FocusState private var focusedField: Field?
|
||||
private enum Field {
|
||||
case Name, Notes
|
||||
@@ -152,13 +150,14 @@ struct AddEventView: View {
|
||||
viewModel.addEvent(
|
||||
newEvent: event
|
||||
)
|
||||
bye.toggle()
|
||||
resetAddEventView()
|
||||
#if canImport(UIKit)
|
||||
UINotificationFeedbackGenerator().notificationOccurred(.success)
|
||||
#endif
|
||||
} label: {
|
||||
Label("Save", systemImage: "checkmark")
|
||||
}
|
||||
.tint(.accent)
|
||||
.modifier(hapticSuccess(trigger: bye))
|
||||
.disabled(event.name.isEmpty)
|
||||
.onTapGesture {
|
||||
if event.name.isEmpty {
|
||||
@@ -180,6 +179,9 @@ struct AddEventView: View {
|
||||
Button() {
|
||||
viewModel.editEvent(event)
|
||||
dismiss()
|
||||
#if canImport(UIKit)
|
||||
UINotificationFeedbackGenerator().notificationOccurred(.success)
|
||||
#endif
|
||||
} label: {
|
||||
Label("Done", systemImage: "checkmark")
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ struct WhatsNewView: View {
|
||||
}
|
||||
.foregroundStyle(.orange)
|
||||
.modifier(glassButton())
|
||||
.modifier(hapticHeavy(trigger: bye))
|
||||
.hapticHeavy(trigger: bye)
|
||||
}
|
||||
.scrollContentBackground(.hidden)
|
||||
.presentationDragIndicator(.visible)
|
||||
|
||||
Reference in New Issue
Block a user