Fixed issues when creating group call from scheduler process
This commit is contained in:
parent
3c2640d4bf
commit
4c809ff7d2
4 changed files with 14 additions and 19 deletions
|
@ -222,7 +222,7 @@ dependencies {
|
|||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation "androidx.security:security-crypto-ktx:1.1.0-alpha03"
|
||||
implementation 'androidx.core:core-splashscreen:1.0.0-beta02'
|
||||
implementation 'androidx.core:core-splashscreen:1.0.0-rc01'
|
||||
|
||||
implementation 'androidx.emoji:emoji:1.1.0'
|
||||
implementation 'androidx.emoji:emoji-bundled:1.1.0'
|
||||
|
|
|
@ -206,7 +206,7 @@ internal fun ConferenceSchedulingParticipantsListFragment.navigateToSummary() {
|
|||
}
|
||||
}
|
||||
|
||||
internal fun ConferenceSchedulingSummaryFragment.goToScheduledConferences() {
|
||||
internal fun ConferenceSchedulingSummaryFragment.navigateToScheduledConferences() {
|
||||
if (findNavController().currentDestination?.id == R.id.conferenceSchedulingSummaryFragment) {
|
||||
findNavController().navigate(
|
||||
R.id.action_global_scheduledConferencesFragment,
|
||||
|
@ -216,15 +216,10 @@ internal fun ConferenceSchedulingSummaryFragment.goToScheduledConferences() {
|
|||
}
|
||||
}
|
||||
|
||||
internal fun ConferenceSchedulingSummaryFragment.navigateToConferenceWaitingRoom(
|
||||
address: String,
|
||||
subject: String?
|
||||
) {
|
||||
internal fun ConferenceSchedulingSummaryFragment.navigateToDialer() {
|
||||
val bundle = Bundle()
|
||||
bundle.putString("Address", address)
|
||||
bundle.putString("Subject", subject)
|
||||
findMasterNavController().navigate(
|
||||
R.id.action_global_conferenceWaitingRoomFragment,
|
||||
R.id.action_global_dialerFragment,
|
||||
bundle,
|
||||
popupTo(R.id.dialerFragment, false)
|
||||
)
|
||||
|
|
|
@ -24,10 +24,10 @@ import android.view.View
|
|||
import androidx.navigation.navGraphViewModels
|
||||
import org.linphone.R
|
||||
import org.linphone.activities.GenericFragment
|
||||
import org.linphone.activities.goToScheduledConferences
|
||||
import org.linphone.activities.main.MainActivity
|
||||
import org.linphone.activities.main.conference.viewmodels.ConferenceSchedulingViewModel
|
||||
import org.linphone.activities.navigateToConferenceWaitingRoom
|
||||
import org.linphone.activities.navigateToDialer
|
||||
import org.linphone.activities.navigateToScheduledConferences
|
||||
import org.linphone.databinding.ConferenceSchedulingSummaryFragmentBinding
|
||||
|
||||
class ConferenceSchedulingSummaryFragment : GenericFragment<ConferenceSchedulingSummaryFragmentBinding>() {
|
||||
|
@ -53,12 +53,12 @@ class ConferenceSchedulingSummaryFragment : GenericFragment<ConferenceScheduling
|
|||
viewModel.conferenceCreationCompletedEvent.observe(
|
||||
viewLifecycleOwner
|
||||
) {
|
||||
it.consume { pair ->
|
||||
it.consume {
|
||||
if (viewModel.scheduleForLater.value == true) {
|
||||
(requireActivity() as MainActivity).showSnackBar(R.string.conference_schedule_info_created)
|
||||
goToScheduledConferences()
|
||||
navigateToScheduledConferences()
|
||||
} else {
|
||||
navigateToConferenceWaitingRoom(pair.first, pair.second)
|
||||
navigateToDialer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@ class ConferenceSchedulingViewModel : ContactsSelectionViewModel() {
|
|||
|
||||
val conferenceCreationInProgress = MutableLiveData<Boolean>()
|
||||
|
||||
val conferenceCreationCompletedEvent: MutableLiveData<Event<Pair<String, String?>>> by lazy {
|
||||
MutableLiveData<Event<Pair<String, String?>>>()
|
||||
val conferenceCreationCompletedEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
val continueEnabled: MediatorLiveData<Boolean> = MediatorLiveData()
|
||||
|
@ -85,7 +85,7 @@ class ConferenceSchedulingViewModel : ContactsSelectionViewModel() {
|
|||
|
||||
address.value = conferenceAddress!!
|
||||
|
||||
if (sendInviteViaChat.value == true) {
|
||||
if (scheduleForLater.value == true && sendInviteViaChat.value == true) {
|
||||
// Send conference info even when conf is not scheduled for later
|
||||
// as the conference server doesn't invite participants automatically
|
||||
val chatRoomParams = coreContext.core.createDefaultChatRoomParams()
|
||||
|
@ -96,7 +96,7 @@ class ConferenceSchedulingViewModel : ContactsSelectionViewModel() {
|
|||
conferenceScheduler.sendInvitations(chatRoomParams)
|
||||
} else {
|
||||
conferenceCreationInProgress.value = false
|
||||
conferenceCreationCompletedEvent.value = Event(Pair(conferenceAddress.asStringUriOnly(), conferenceScheduler.info?.subject))
|
||||
conferenceCreationCompletedEvent.value = Event(true)
|
||||
}
|
||||
} else if (state == ConferenceSchedulerState.Error) {
|
||||
Log.e("[Conference Creation] Failed to create conference!")
|
||||
|
@ -123,7 +123,7 @@ class ConferenceSchedulingViewModel : ContactsSelectionViewModel() {
|
|||
if (conferenceAddress == null) {
|
||||
Log.e("[Conference Creation] Conference address is null!")
|
||||
} else {
|
||||
conferenceCreationCompletedEvent.value = Event(Pair(conferenceAddress.asStringUriOnly(), conferenceScheduler.info?.subject))
|
||||
conferenceCreationCompletedEvent.value = Event(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue