forked from mirrors/linphone-iphone
Cancel without popup when deleting a meeting where we are not the organizer
This commit is contained in:
parent
fcce09843e
commit
3ef0db8645
2 changed files with 11 additions and 2 deletions
|
|
@ -111,7 +111,13 @@ struct MeetingFragment: View {
|
|||
Button(role: .destructive) {
|
||||
withAnimation {
|
||||
meetingsListViewModel.selectedMeetingToDelete = meetingViewModel.displayedMeeting
|
||||
isShowSendCancelMeetingNotificationPopup.toggle()
|
||||
if let myself = meetingViewModel.myself, myself.isOrganizer == true {
|
||||
isShowSendCancelMeetingNotificationPopup.toggle()
|
||||
} else {
|
||||
// If we're not organizer, directly delete the conference
|
||||
meetingViewModel.displayedMeeting = nil
|
||||
meetingsListViewModel.deleteSelectedMeeting()
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
HStack {
|
||||
|
|
|
|||
|
|
@ -56,10 +56,13 @@ struct MeetingsListBottomSheet: View {
|
|||
CoreContext.shared.doOnCoreQueue { core in
|
||||
if let organizerUri = self.meetingsListViewModel.selectedMeetingToDelete?.confInfo.organizer {
|
||||
if core.defaultAccount?.contactAddress?.weakEqual(address2: organizerUri) ?? false {
|
||||
// If we are the organizer, display popup for sending
|
||||
DispatchQueue.main.async {
|
||||
// If we are the organizer, display popup for sending
|
||||
self.isShowSendCancelMeetingNotificationPopup = true
|
||||
}
|
||||
} else {
|
||||
// If we are not the organizer, delete meeting locally without popup
|
||||
meetingsListViewModel.deleteSelectedMeeting()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue