locked the freak in for this one -

can cancel events being completed!!!!!
added a cancel to symbolpicker
and made it dip after choosing
extracted completevent into viewmodel
eventlistview is pretty full rn -- need to cleana
added color picker ot addeventview wtf why wasnt it there
This commit is contained in:
neon443 committed 2025-06-14 21:32:11 +01:00
1 parent d80011ea27
commit 5dd25f1ede
7 files changed
+249 -49

No files matched your search

+11
View File
@@ -222,6 +222,17 @@ class EventViewModel: ObservableObject, @unchecked Sendable {
saveEvents() //sync with icloud
}
func completeEvent(_ event: inout Event) {
withAnimation { event.complete.toggle() }
let eventToModify = self.events.firstIndex() { currEvent in
currEvent.id == event.id
}
if let eventToModify = eventToModify {
self.events[eventToModify] = event
self.saveEvents()
}
}
func removeEvent(at index: IndexSet) {
events.remove(atOffsets: index)
saveEvents() //sync local and icl
+12 -1
View File
@@ -14,6 +14,7 @@ struct SymbolsPicker: View {
@FocusState var searchfocuesd: Bool
@State var searchInput: String = ""
@Environment(\.dismiss) var dismiss
var symbols: [String] {
return symbolsLoader.getSymbols(searchInput)
@@ -45,6 +46,8 @@ struct SymbolsPicker: View {
ForEach(symbols, id: \.self) { symbol in
Button() {
selection = symbol
searchInput = ""
dismiss()
} label: {
VStack {
Image(systemName: symbol)
@@ -62,7 +65,15 @@ struct SymbolsPicker: View {
}
}
}
.searchable(text: $searchInput)
}
.searchable(text: $searchInput)
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Cancel") {
searchInput = ""
dismiss()
}
}
}
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.