mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 10:19:23 +00:00
Meeting cancellation: only delete meeting when pressing one of the confirmation popup buttons.
This commit is contained in:
parent
d729f7570a
commit
fcce09843e
4 changed files with 14 additions and 12 deletions
|
|
@ -1016,13 +1016,19 @@ struct ContentView: View {
|
|||
|
||||
if isShowSendCancelMeetingNotificationPopup {
|
||||
PopupView(isShowPopup: $isShowSendCancelMeetingNotificationPopup,
|
||||
title: Text("The meeting has been cancelled"),
|
||||
title: Text("The meeting will be cancelled"),
|
||||
content: Text("Send notification to participants ?"),
|
||||
titleFirstButton: Text("Cancel"),
|
||||
actionFirstButton: { self.isShowSendCancelMeetingNotificationPopup.toggle() },
|
||||
titleSecondButton: Text("Ok"),
|
||||
titleFirstButton: Text("Cancel for me only"),
|
||||
actionFirstButton: {
|
||||
meetingViewModel.displayedMeeting = nil
|
||||
meetingsListViewModel.deleteSelectedMeeting()
|
||||
self.isShowSendCancelMeetingNotificationPopup.toggle(
|
||||
) },
|
||||
titleSecondButton: Text("Send cancellation notifications"),
|
||||
actionSecondButton: {
|
||||
meetingViewModel.displayedMeeting = nil
|
||||
if let meetingToDelete = self.meetingsListViewModel.selectedMeetingToDelete {
|
||||
meetingsListViewModel.deleteSelectedMeeting()
|
||||
// We're in the meeting list view
|
||||
self.meetingViewModel.sendMeetingCancelledNotifications(meeting: meetingToDelete)
|
||||
self.isShowSendCancelMeetingNotificationPopup.toggle()
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@ struct MeetingFragment: View {
|
|||
Button(role: .destructive) {
|
||||
withAnimation {
|
||||
meetingsListViewModel.selectedMeetingToDelete = meetingViewModel.displayedMeeting
|
||||
meetingViewModel.displayedMeeting = nil
|
||||
meetingsListViewModel.deleteSelectedMeeting()
|
||||
isShowSendCancelMeetingNotificationPopup.toggle()
|
||||
}
|
||||
} label: {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ struct MeetingsListBottomSheet: View {
|
|||
}
|
||||
|
||||
Button {
|
||||
meetingsListViewModel.deleteSelectedMeeting()
|
||||
CoreContext.shared.doOnCoreQueue { core in
|
||||
if let organizerUri = self.meetingsListViewModel.selectedMeetingToDelete?.confInfo.organizer {
|
||||
if core.defaultAccount?.contactAddress?.weakEqual(address2: organizerUri) ?? false {
|
||||
|
|
|
|||
|
|
@ -359,10 +359,9 @@ class MeetingViewModel: ObservableObject {
|
|||
}
|
||||
|
||||
func sendMeetingCancelledNotifications(meeting: MeetingModel) {
|
||||
Log.error("\(MeetingViewModel.TAG) - sendMeetingCancelledNotifications TODO")
|
||||
//CoreContext.shared.doOnCoreQueue { core in
|
||||
// self.resetConferenceSchedulerAndListeners(core: core)
|
||||
// self.conferenceScheduler?.cancelConference(conferenceInfo: meeting.confInfo)
|
||||
//}
|
||||
CoreContext.shared.doOnCoreQueue { core in
|
||||
self.resetConferenceSchedulerAndListeners(core: core)
|
||||
self.conferenceScheduler?.cancelConference(conferenceInfo: meeting.confInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue