Prevent 'Remote Conference' default subject from being visible when joining a conference, using real one instead
This commit is contained in:
parent
0b06e22258
commit
0ce885a260
3 changed files with 20 additions and 19 deletions
|
@ -30,7 +30,6 @@ import org.linphone.compatibility.Compatibility
|
||||||
import org.linphone.contact.GenericContactData
|
import org.linphone.contact.GenericContactData
|
||||||
import org.linphone.core.*
|
import org.linphone.core.*
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.utils.AppUtils
|
|
||||||
import org.linphone.utils.LinphoneUtils
|
import org.linphone.utils.LinphoneUtils
|
||||||
|
|
||||||
open class CallData(val call: Call) : GenericContactData(call.remoteAddress) {
|
open class CallData(val call: Call) : GenericContactData(call.remoteAddress) {
|
||||||
|
@ -232,15 +231,7 @@ open class CallData(val call: Call) : GenericContactData(call.remoteAddress) {
|
||||||
isInRemoteConference.value = conference != null
|
isInRemoteConference.value = conference != null
|
||||||
if (conference != null) {
|
if (conference != null) {
|
||||||
Log.d("[Call] Found conference attached to call")
|
Log.d("[Call] Found conference attached to call")
|
||||||
remoteConferenceSubject.value = if (conference.subject.isNullOrEmpty()) {
|
remoteConferenceSubject.value = LinphoneUtils.getConferenceSubject(conference)
|
||||||
if (conference.me.isFocus) {
|
|
||||||
AppUtils.getString(R.string.conference_local_title)
|
|
||||||
} else {
|
|
||||||
AppUtils.getString(R.string.conference_default_title)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
conference.subject
|
|
||||||
}
|
|
||||||
Log.d("[Call] Found conference related to this call with subject [${remoteConferenceSubject.value}]")
|
Log.d("[Call] Found conference related to this call with subject [${remoteConferenceSubject.value}]")
|
||||||
|
|
||||||
val participantsList = arrayListOf<ConferenceInfoParticipantData>()
|
val participantsList = arrayListOf<ConferenceInfoParticipantData>()
|
||||||
|
|
|
@ -264,6 +264,7 @@ class ConferenceViewModel : ViewModel() {
|
||||||
conference.addListener(conferenceListener)
|
conference.addListener(conferenceListener)
|
||||||
|
|
||||||
isRecording.value = conference.isRecording
|
isRecording.value = conference.isRecording
|
||||||
|
subject.value = LinphoneUtils.getConferenceSubject(conference)
|
||||||
|
|
||||||
updateConferenceLayout(conference)
|
updateConferenceLayout(conference)
|
||||||
}
|
}
|
||||||
|
@ -278,15 +279,7 @@ class ConferenceViewModel : ViewModel() {
|
||||||
isConferenceLocallyPaused.value = !conference.isIn
|
isConferenceLocallyPaused.value = !conference.isIn
|
||||||
isMeAdmin.value = conference.me.isAdmin
|
isMeAdmin.value = conference.me.isAdmin
|
||||||
isVideoConference.value = conference.currentParams.isVideoEnabled
|
isVideoConference.value = conference.currentParams.isVideoEnabled
|
||||||
subject.value = if (conference.subject.isNullOrEmpty()) {
|
subject.value = LinphoneUtils.getConferenceSubject(conference)
|
||||||
if (conference.me.isFocus) {
|
|
||||||
AppUtils.getString(R.string.conference_local_title)
|
|
||||||
} else {
|
|
||||||
AppUtils.getString(R.string.conference_default_title)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
conference.subject
|
|
||||||
}
|
|
||||||
|
|
||||||
updateConferenceLayout(conference)
|
updateConferenceLayout(conference)
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,23 @@ class LinphoneUtils {
|
||||||
return conferenceAddress
|
return conferenceAddress
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getConferenceSubject(conference: Conference): String? {
|
||||||
|
return if (conference.subject.isNullOrEmpty()) {
|
||||||
|
val conferenceInfo = coreContext.core.findConferenceInformationFromUri(conference.conferenceAddress)
|
||||||
|
if (conferenceInfo != null) {
|
||||||
|
conferenceInfo.subject
|
||||||
|
} else {
|
||||||
|
if (conference.me.isFocus) {
|
||||||
|
AppUtils.getString(R.string.conference_local_title)
|
||||||
|
} else {
|
||||||
|
AppUtils.getString(R.string.conference_default_title)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
conference.subject
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun isLimeAvailable(): Boolean {
|
fun isLimeAvailable(): Boolean {
|
||||||
val core = coreContext.core
|
val core = coreContext.core
|
||||||
return core.limeX3DhAvailable() && core.isLimeX3DhEnabled &&
|
return core.limeX3DhAvailable() && core.isLimeX3DhEnabled &&
|
||||||
|
|
Loading…
Reference in a new issue