mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Admin set/unset notification in conference
This commit is contained in:
parent
7d9c923a79
commit
9fe2a38455
3 changed files with 10 additions and 1 deletions
|
|
@ -134,7 +134,8 @@ import UIKit
|
|||
@objc static let dialog_accept = NSLocalizedString("Accept",comment:"")
|
||||
@objc static let dialog_decline = NSLocalizedString("Decline",comment:"")
|
||||
@objc static let conference_empty = NSLocalizedString("You are currently alone in this group call",comment:"")
|
||||
|
||||
@objc static let conference_admin_set = NSLocalizedString("%s is now admin",comment:"")
|
||||
@objc static let conference_admin_unset = NSLocalizedString("%s is no longer admin",comment:"")
|
||||
|
||||
|
||||
// FROM ANDROID END
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ class ConferenceViewModel {
|
|||
self.updateParticipantsList(conference)
|
||||
if let participantData = self.conferenceParticipants.value?.filter ({$0.participant.address!.weakEqual(address2: participant.address!)}).first {
|
||||
self.participantAdminStatusChangedEvent.value = participantData
|
||||
self.notifyAdminStatusChanged(participantData: participantData)
|
||||
} else {
|
||||
Log.w("[Conference] Failed to find participant [\(participant.address!.asStringUriOnly())] in conferenceParticipants list")
|
||||
}
|
||||
|
|
@ -166,6 +167,13 @@ class ConferenceViewModel {
|
|||
}
|
||||
}
|
||||
|
||||
func notifyAdminStatusChanged(participantData:ConferenceParticipantData) {
|
||||
if let participantName = participantData.participant.address?.addressBookEnhancedDisplayName() {
|
||||
let message = (participantData.participant.isAdmin ? VoipTexts.conference_admin_set : VoipTexts.conference_admin_unset).replacingOccurrences(of: "%s", with: participantName)
|
||||
VoipDialog.toast(message: message)
|
||||
}
|
||||
}
|
||||
|
||||
func pauseConference() {
|
||||
Log.i("[Conference] Leaving conference with address \(conference) temporarily")
|
||||
let _ = conference.value?.leave()
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Reference in a new issue