Compare commits
No commits in common. "f0137eb1e569036d072ecff19e0aff3a5dc41cf8" and "495245427b4046071f54e39ecaec16f9851d9de0" have entirely different histories.
f0137eb1e5
...
495245427b
@ -1745,7 +1745,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 147;
|
CURRENT_PROJECT_VERSION = 146;
|
||||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
|
INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
|
||||||
@ -1772,7 +1772,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 147;
|
CURRENT_PROJECT_VERSION = 146;
|
||||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
|
INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
|
||||||
|
|||||||
@ -14,8 +14,6 @@ struct EventsScreen: View {
|
|||||||
|
|
||||||
@State var viewModel: EventsViewModel
|
@State var viewModel: EventsViewModel
|
||||||
@State var selectedEvent: EventModel?
|
@State var selectedEvent: EventModel?
|
||||||
@State var deleteConfirmationPresented: Bool = false
|
|
||||||
@State var eventToDelete: EventModel?
|
|
||||||
|
|
||||||
init(viewModel: EventsViewModel) {
|
init(viewModel: EventsViewModel) {
|
||||||
self.viewModel = viewModel
|
self.viewModel = viewModel
|
||||||
@ -60,18 +58,6 @@ struct EventsScreen: View {
|
|||||||
} message: { event in
|
} message: { event in
|
||||||
Text(viewModel.getConfirmMessge(from: event))
|
Text(viewModel.getConfirmMessge(from: event))
|
||||||
}
|
}
|
||||||
.confirmationDialog(eventToDelete?.address ?? "",
|
|
||||||
isPresented: $deleteConfirmationPresented,
|
|
||||||
titleVisibility: .visible) {
|
|
||||||
|
|
||||||
Button("Delete", role: .destructive) {
|
|
||||||
if let eventToDelete {
|
|
||||||
Task { await viewModel.deleteEvent(eventToDelete) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} message: {
|
|
||||||
Text("Are you sure you want to delete this event?")
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,8 +131,7 @@ struct EventsScreen: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Button(role: .destructive) {
|
Button(role: .destructive) {
|
||||||
eventToDelete = event
|
Task { await viewModel.deleteEvent(event) }
|
||||||
deleteConfirmationPresented = true
|
|
||||||
} label: {
|
} label: {
|
||||||
Label(useLabels ? "Delete" : "", systemImage: "trash")
|
Label(useLabels ? "Delete" : "", systemImage: "trash")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -419,5 +419,3 @@
|
|||||||
"Open in Maps" = "Открыть на карте";
|
"Open in Maps" = "Открыть на карте";
|
||||||
|
|
||||||
"Something went wrong" = "Что-то пошло не так";
|
"Something went wrong" = "Что-то пошло не так";
|
||||||
|
|
||||||
"Are you sure you want to delete this event?" = "Вы уверены, что хотите удалить это событие?";
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user