Moved some code around & added invite participant into conf

This commit is contained in:
Sylvain Berfini 2024-04-08 14:01:19 +02:00
parent d19f08cf86
commit d6ea531cea
30 changed files with 239 additions and 66 deletions

View file

@ -47,10 +47,10 @@ import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.CallActivityBinding
import org.linphone.ui.GenericActivity
import org.linphone.ui.call.conference.fragment.ActiveConferenceCallFragmentDirections
import org.linphone.ui.call.conference.fragment.ConferenceLayoutMenuDialogFragment
import org.linphone.ui.call.fragment.ActiveCallFragmentDirections
import org.linphone.ui.call.fragment.ActiveConferenceCallFragmentDirections
import org.linphone.ui.call.fragment.AudioDevicesMenuDialogFragment
import org.linphone.ui.call.fragment.ConferenceLayoutMenuDialogFragment
import org.linphone.ui.call.fragment.IncomingCallFragmentDirections
import org.linphone.ui.call.fragment.OutgoingCallFragmentDirections
import org.linphone.ui.call.model.AudioDeviceModel

View file

@ -29,7 +29,7 @@ import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import org.linphone.R
import org.linphone.databinding.CallConferenceParticipantListCellBinding
import org.linphone.ui.call.model.ConferenceParticipantModel
import org.linphone.ui.call.conference.model.ConferenceParticipantModel
class ConferenceParticipantsListAdapter :
ListAdapter<ConferenceParticipantModel, RecyclerView.ViewHolder>(ParticipantDiffCallback()) {

View file

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.fragment
package org.linphone.ui.call.conference.fragment
import android.content.ClipData
import android.content.ClipboardManager
@ -35,6 +35,7 @@ import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.CallActiveConferenceFragmentBinding
import org.linphone.ui.call.fragment.GenericCallFragment
import org.linphone.ui.call.viewmodel.CallsViewModel
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
import org.linphone.utils.Event

View file

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.fragment
package org.linphone.ui.call.conference.fragment
import android.os.Bundle
import android.view.LayoutInflater
@ -30,7 +30,8 @@ import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.CallConferenceActiveSpeakerFragmentBinding
import org.linphone.ui.call.model.ConferenceModel
import org.linphone.ui.call.conference.viewmodel.ConferenceViewModel
import org.linphone.ui.call.fragment.GenericCallFragment
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
@UiThread
class ConferenceActiveSpeakerFragment : GenericCallFragment() {
@ -64,7 +65,7 @@ class ConferenceActiveSpeakerFragment : GenericCallFragment() {
callViewModel.conferenceModel.conferenceLayout.observe(viewLifecycleOwner) {
when (it) {
ConferenceModel.GRID_LAYOUT -> {
ConferenceViewModel.GRID_LAYOUT -> {
Log.i(
"$TAG Conference layout changed to mosaic, navigating to matching fragment"
)
@ -74,7 +75,7 @@ class ConferenceActiveSpeakerFragment : GenericCallFragment() {
)
}
}
ConferenceModel.AUDIO_ONLY_LAYOUT -> {
ConferenceViewModel.AUDIO_ONLY_LAYOUT -> {
Log.i(
"$TAG Conference layout changed to audio only, navigating to matching fragment"
)

View file

@ -0,0 +1,108 @@
/*
* Copyright (c) 2010-2024 Belledonne Communications SARL.
*
* This file is part of linphone-android
* (see https://www.linphone.org).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.conference.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.annotation.UiThread
import androidx.core.view.doOnPreDraw
import androidx.lifecycle.ViewModelProvider
import androidx.navigation.fragment.findNavController
import org.linphone.core.Address
import org.linphone.core.Friend
import org.linphone.core.tools.Log
import org.linphone.databinding.GenericAddParticipantsFragmentBinding
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
import org.linphone.ui.main.fragment.GenericAddressPickerFragment
import org.linphone.ui.main.viewmodel.AddParticipantsViewModel
@UiThread
class ConferenceAddParticipantsFragment : GenericAddressPickerFragment() {
companion object {
private const val TAG = "[Conference Add Participants Fragment]"
}
private lateinit var binding: GenericAddParticipantsFragmentBinding
override lateinit var viewModel: AddParticipantsViewModel
private lateinit var callViewModel: CurrentCallViewModel
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View {
binding = GenericAddParticipantsFragmentBinding.inflate(layoutInflater)
return binding.root
}
override fun goBack(): Boolean {
return findNavController().popBackStack()
}
override fun onSingleAddressSelected(address: Address, friend: Friend) {
Log.e("$TAG This shouldn't happen as we should always be in multiple selection mode here!")
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
viewModel = ViewModelProvider(this)[AddParticipantsViewModel::class.java]
callViewModel = requireActivity().run {
ViewModelProvider(this)[CurrentCallViewModel::class.java]
}
postponeEnterTransition()
super.onViewCreated(view, savedInstanceState)
binding.lifecycleOwner = viewLifecycleOwner
binding.viewModel = viewModel
binding.setBackClickListener {
goBack()
}
setupRecyclerView(binding.contactsList)
viewModel.contactsAndSuggestionsList.observe(
viewLifecycleOwner
) {
Log.i("$TAG Contacts & suggestions list is ready with [${it.size}] items")
adapter.submitList(it)
attachAdapter()
(view.parent as? ViewGroup)?.doOnPreDraw {
startPostponedEnterTransition()
}
}
viewModel.selectedSipUrisEvent.observe(viewLifecycleOwner) {
it.consume { list ->
Log.i("$TAG Trying to add participant(s) [${list.size}] to conference")
callViewModel.conferenceModel.inviteSipUrisIntoConference(list)
goBack()
}
}
}
}

View file

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.fragment
package org.linphone.ui.call.conference.fragment
import android.os.Bundle
import android.view.LayoutInflater
@ -29,7 +29,8 @@ import androidx.navigation.fragment.findNavController
import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.CallConferenceAudioOnlyFragmentBinding
import org.linphone.ui.call.model.ConferenceModel
import org.linphone.ui.call.conference.viewmodel.ConferenceViewModel
import org.linphone.ui.call.fragment.GenericCallFragment
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
@UiThread
class ConferenceAudioOnlyFragment : GenericCallFragment() {
@ -63,7 +64,7 @@ class ConferenceAudioOnlyFragment : GenericCallFragment() {
callViewModel.conferenceModel.conferenceLayout.observe(viewLifecycleOwner) {
when (it) {
ConferenceModel.ACTIVE_SPEAKER_LAYOUT -> {
ConferenceViewModel.ACTIVE_SPEAKER_LAYOUT -> {
Log.i(
"$TAG Conference layout changed to active speaker, navigating to matching fragment"
)
@ -73,7 +74,7 @@ class ConferenceAudioOnlyFragment : GenericCallFragment() {
)
}
}
ConferenceModel.GRID_LAYOUT -> {
ConferenceViewModel.GRID_LAYOUT -> {
Log.i(
"$TAG Conference layout changed to mosaic, navigating to matching fragment"
)

View file

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.fragment
package org.linphone.ui.call.conference.fragment
import android.os.Bundle
import android.view.LayoutInflater
@ -29,7 +29,8 @@ import androidx.navigation.fragment.findNavController
import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.CallConferenceGridFragmentBinding
import org.linphone.ui.call.model.ConferenceModel
import org.linphone.ui.call.conference.viewmodel.ConferenceViewModel
import org.linphone.ui.call.fragment.GenericCallFragment
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
@UiThread
class ConferenceGridFragment : GenericCallFragment() {
@ -63,7 +64,7 @@ class ConferenceGridFragment : GenericCallFragment() {
callViewModel.conferenceModel.conferenceLayout.observe(viewLifecycleOwner) {
when (it) {
ConferenceModel.ACTIVE_SPEAKER_LAYOUT -> {
ConferenceViewModel.ACTIVE_SPEAKER_LAYOUT -> {
Log.i(
"$TAG Conference layout changed to active speaker, navigating to matching fragment"
)
@ -73,7 +74,7 @@ class ConferenceGridFragment : GenericCallFragment() {
)
}
}
ConferenceModel.AUDIO_ONLY_LAYOUT -> {
ConferenceViewModel.AUDIO_ONLY_LAYOUT -> {
Log.i(
"$TAG Conference layout changed to audio only, navigating to matching fragment"
)

View file

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.fragment
package org.linphone.ui.call.conference.fragment
import android.app.Dialog
import android.content.DialogInterface
@ -30,11 +30,11 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import org.linphone.databinding.CallConferenceLayoutBottomSheetBinding
import org.linphone.ui.call.model.ConferenceModel
import org.linphone.ui.call.conference.viewmodel.ConferenceViewModel
@UiThread
class ConferenceLayoutMenuDialogFragment(
val conferenceModel: ConferenceModel,
val conferenceModel: ConferenceViewModel,
private val onDismiss: (() -> Unit)? = null
) : BottomSheetDialogFragment() {
companion object {
@ -71,18 +71,18 @@ class ConferenceLayoutMenuDialogFragment(
view.setGridClickListener {
if (conferenceModel.participantDevices.value.orEmpty().size < 6) {
conferenceModel.changeLayout(ConferenceModel.GRID_LAYOUT)
conferenceModel.changeLayout(ConferenceViewModel.GRID_LAYOUT)
dismiss()
} else {
// TODO: notify user
}
}
view.setActiveSpeakerClickListener {
conferenceModel.changeLayout(ConferenceModel.ACTIVE_SPEAKER_LAYOUT)
conferenceModel.changeLayout(ConferenceViewModel.ACTIVE_SPEAKER_LAYOUT)
dismiss()
}
view.setAudioOnlyClickListener {
conferenceModel.changeLayout(ConferenceModel.AUDIO_ONLY_LAYOUT)
conferenceModel.changeLayout(ConferenceViewModel.AUDIO_ONLY_LAYOUT)
dismiss()
}

View file

@ -17,18 +17,22 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.fragment
package org.linphone.ui.call.conference.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.animation.Animation
import android.view.animation.AnimationUtils
import androidx.lifecycle.ViewModelProvider
import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.LinearLayoutManager
import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.CallConferenceParticipantsListFragmentBinding
import org.linphone.ui.call.adapter.ConferenceParticipantsListAdapter
import org.linphone.ui.call.fragment.GenericCallFragment
import org.linphone.ui.call.viewmodel.CurrentCallViewModel
class ConferenceParticipantsListFragment : GenericCallFragment() {
@ -42,6 +46,14 @@ class ConferenceParticipantsListFragment : GenericCallFragment() {
private lateinit var adapter: ConferenceParticipantsListAdapter
override fun onCreateAnimation(transit: Int, enter: Boolean, nextAnim: Int): Animation? {
if (findNavController().currentDestination?.id == R.id.conferenceAddParticipantsFragment) {
// Holds fragment in place while new fragment slides over it
return AnimationUtils.loadAnimation(activity, R.anim.hold)
}
return super.onCreateAnimation(transit, enter, nextAnim)
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -79,7 +91,11 @@ class ConferenceParticipantsListFragment : GenericCallFragment() {
}
binding.setAddParticipantsClickListener {
// TODO FIXME: display add participants fragment
if (findNavController().currentDestination?.id == R.id.conferenceParticipantsListFragment) {
val action =
ConferenceParticipantsListFragmentDirections.actionConferenceParticipantsListFragmentToConferenceAddParticipantsFragment()
findNavController().navigate(action)
}
}
viewModel.conferenceModel.participants.observe(viewLifecycleOwner) {

View file

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.model
package org.linphone.ui.call.conference.model
import android.view.TextureView
import androidx.annotation.UiThread

View file

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.model
package org.linphone.ui.call.conference.model
import androidx.annotation.UiThread
import androidx.annotation.WorkerThread

View file

@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.view
package org.linphone.ui.call.conference.view
import android.annotation.SuppressLint
import android.content.Context

View file

@ -17,13 +17,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.linphone.ui.call.model
package org.linphone.ui.call.conference.viewmodel
import androidx.annotation.UiThread
import androidx.annotation.WorkerThread
import androidx.lifecycle.MutableLiveData
import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.R
import org.linphone.core.Address
import org.linphone.core.Call
import org.linphone.core.Conference
import org.linphone.core.ConferenceListenerStub
@ -32,11 +33,13 @@ import org.linphone.core.Participant
import org.linphone.core.ParticipantDevice
import org.linphone.core.StreamType
import org.linphone.core.tools.Log
import org.linphone.ui.call.view.GridBoxLayout
import org.linphone.ui.call.conference.model.ConferenceParticipantDeviceModel
import org.linphone.ui.call.conference.model.ConferenceParticipantModel
import org.linphone.ui.call.conference.view.GridBoxLayout
import org.linphone.utils.AppUtils
import org.linphone.utils.Event
class ConferenceModel {
class ConferenceViewModel {
companion object {
private const val TAG = "[Conference ViewModel]"
@ -259,6 +262,29 @@ class ConferenceModel {
}
}
@UiThread
fun inviteSipUrisIntoConference(uris: List<String>) {
coreContext.postOnCoreThread { core ->
val addresses = arrayListOf<Address>()
for (uri in uris) {
val address = core.interpretUrl(uri, false)
if (address != null) {
addresses.add(address)
Log.i("$TAG Address [${address.asStringUriOnly()}] will be added to conference")
} else {
Log.e(
"$TAG Failed to parse SIP URI [$uri] into address, can't add it to the conference!"
)
// TODO: notify user
}
}
val addressesArray = arrayOfNulls<Address>(addresses.size)
addresses.toArray(addressesArray)
Log.i("$TAG Trying to add [${addressesArray.size}] new participant(s) into conference")
conference.addParticipants(addressesArray)
}
}
@WorkerThread
fun setNewLayout(newLayout: Int) {
val call = conference.call

View file

@ -124,11 +124,15 @@ class ActiveCallFragment : GenericCallFragment() {
}
override fun onCreateAnimation(transit: Int, enter: Boolean, nextAnim: Int): Animation? {
if (findNavController().currentDestination?.id == R.id.newCallFragment || findNavController().currentDestination?.id == R.id.callsListFragment) {
// Holds fragment in place while new fragment slides over it
return AnimationUtils.loadAnimation(activity, R.anim.hold)
return when (findNavController().currentDestination?.id) {
R.id.newCallFragment, R.id.callsListFragment, R.id.transferCallFragment, R.id.inCallConversationFragment -> {
// Holds fragment in place while new fragment slides over it
AnimationUtils.loadAnimation(activity, R.anim.hold)
}
else -> {
super.onCreateAnimation(transit, enter, nextAnim)
}
}
return super.onCreateAnimation(transit, enter, nextAnim)
}
override fun onCreateView(

View file

@ -51,10 +51,10 @@ import org.linphone.core.MediaEncryption
import org.linphone.core.SecurityLevel
import org.linphone.core.StreamType
import org.linphone.core.tools.Log
import org.linphone.ui.call.conference.viewmodel.ConferenceViewModel
import org.linphone.ui.call.model.AudioDeviceModel
import org.linphone.ui.call.model.CallMediaEncryptionModel
import org.linphone.ui.call.model.CallStatsModel
import org.linphone.ui.call.model.ConferenceModel
import org.linphone.ui.main.contacts.model.ContactAvatarModel
import org.linphone.ui.main.history.model.NumpadModel
import org.linphone.ui.main.model.isInSecureMode
@ -173,7 +173,7 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
// Conference
val conferenceModel = ConferenceModel()
val conferenceModel = ConferenceViewModel()
val goToConferenceEvent: MutableLiveData<Event<Boolean>> by lazy {
MutableLiveData<Event<Boolean>>()
@ -592,7 +592,7 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
Log.i("$TAG Conference found and video disabled in params, enabling it")
params.isVideoEnabled = true
params.videoDirection = MediaDirection.SendRecv
conferenceModel.setNewLayout(ConferenceModel.ACTIVE_SPEAKER_LAYOUT)
conferenceModel.setNewLayout(ConferenceViewModel.ACTIVE_SPEAKER_LAYOUT)
} else {
if (params?.videoDirection == MediaDirection.SendRecv || params?.videoDirection == MediaDirection.SendOnly) {
Log.i(

View file

@ -62,7 +62,7 @@ import org.linphone.contacts.AbstractAvatarModel
import org.linphone.contacts.AvatarGenerator
import org.linphone.core.ConsolidatedPresence
import org.linphone.core.tools.Log
import org.linphone.ui.call.model.ConferenceParticipantDeviceModel
import org.linphone.ui.call.conference.model.ConferenceParticipantDeviceModel
/**
* This file contains all the data binding necessary for the app

View file

@ -98,7 +98,7 @@
android:textSize="14sp"
android:textColor="?attr/color_main2_600"
android:background="@drawable/edit_text_background"
android:inputType="text"
android:inputType="text|textNoSuggestions"
android:hint="@string/sip_address_hint"
app:layout_constraintWidth_max="@dimen/text_input_max_width"
app:layout_constraintTop_toBottomOf="@id/sip_identity_label"

View file

@ -88,7 +88,7 @@
android:textSize="14sp"
android:textColor="?attr/color_main2_600"
android:background="@drawable/edit_text_background"
android:inputType="text"
android:inputType="text|textNoSuggestions"
android:hint="@string/sip_address_hint"
app:layout_constraintWidth_max="@dimen/text_input_max_width"
app:layout_constraintTop_toBottomOf="@id/sip_identity_label"

View file

@ -5,7 +5,7 @@
<data>
<import type="android.view.View" />
<import type="org.linphone.ui.call.model.ConferenceModel" />
<import type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
<variable
name="backClickListener"
type="View.OnClickListener" />
@ -29,7 +29,7 @@
type="org.linphone.ui.call.viewmodel.CurrentCallViewModel" />
<variable
name="conferenceViewModel"
type="org.linphone.ui.call.model.ConferenceModel" />
type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
<variable
name="callsViewModel"
type="org.linphone.ui.call.viewmodel.CallsViewModel" />

View file

@ -7,7 +7,7 @@
<import type="android.view.View" />
<variable
name="model"
type="org.linphone.ui.call.model.ConferenceParticipantDeviceModel" />
type="org.linphone.ui.call.conference.model.ConferenceParticipantDeviceModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout

View file

@ -5,13 +5,13 @@
<data>
<import type="android.view.View" />
<import type="org.linphone.ui.call.model.ConferenceModel" />
<import type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
<variable
name="viewModel"
type="org.linphone.ui.call.viewmodel.CurrentCallViewModel" />
<variable
name="conferenceViewModel"
type="org.linphone.ui.call.model.ConferenceModel" />
type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout

View file

@ -7,7 +7,7 @@
<import type="android.view.View" />
<variable
name="model"
type="org.linphone.ui.call.model.ConferenceParticipantDeviceModel" />
type="org.linphone.ui.call.conference.model.ConferenceParticipantDeviceModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout

View file

@ -4,13 +4,13 @@
<data>
<import type="android.view.View" />
<import type="org.linphone.ui.call.model.ConferenceModel" />
<import type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
<variable
name="viewModel"
type="org.linphone.ui.call.viewmodel.CurrentCallViewModel" />
<variable
name="conferenceViewModel"
type="org.linphone.ui.call.model.ConferenceModel" />
type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout

View file

@ -7,7 +7,7 @@
<import type="android.view.View" />
<variable
name="model"
type="org.linphone.ui.call.model.ConferenceParticipantDeviceModel" />
type="org.linphone.ui.call.conference.model.ConferenceParticipantDeviceModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout

View file

@ -4,13 +4,13 @@
<data>
<import type="android.view.View" />
<import type="org.linphone.ui.call.model.ConferenceModel" />
<import type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
<variable
name="viewModel"
type="org.linphone.ui.call.viewmodel.CurrentCallViewModel" />
<variable
name="conferenceViewModel"
type="org.linphone.ui.call.model.ConferenceModel" />
type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
@ -19,7 +19,7 @@
android:layout_height="match_parent"
android:background="@color/gray_900">
<org.linphone.ui.call.view.GridBoxLayout
<org.linphone.ui.call.conference.view.GridBoxLayout
android:id="@+id/grid_box_layout"
android:layout_width="0dp"
android:layout_height="0dp"

View file

@ -4,7 +4,7 @@
<data>
<import type="android.view.View" />
<import type="org.linphone.ui.call.model.ConferenceModel" />
<import type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
<variable
name="gridClickListener"
type="View.OnClickListener" />
@ -16,7 +16,7 @@
type="View.OnClickListener" />
<variable
name="viewModel"
type="org.linphone.ui.call.model.ConferenceModel" />
type="org.linphone.ui.call.conference.viewmodel.ConferenceViewModel" />
</data>
<LinearLayout
@ -39,7 +39,7 @@
android:drawableEnd="@drawable/squares_four"
android:drawableTint="@color/in_call_label_color"
android:enabled="@{viewModel.participantDevices.size() &lt; 7 &amp;&amp; !viewModel.isScreenSharing, default=false}"
android:checked="@{viewModel.conferenceLayout == ConferenceModel.GRID_LAYOUT}"
android:checked="@{viewModel.conferenceLayout == ConferenceViewModel.GRID_LAYOUT}"
app:useMaterialThemeColors="false"
app:buttonTint="@color/in_call_label_color"/>
@ -56,7 +56,7 @@
android:layout_marginBottom="1dp"
android:drawableEnd="@drawable/picture_in_picture"
android:drawableTint="@color/white"
android:checked="@{viewModel.conferenceLayout == ConferenceModel.ACTIVE_SPEAKER_LAYOUT}"
android:checked="@{viewModel.conferenceLayout == ConferenceViewModel.ACTIVE_SPEAKER_LAYOUT}"
app:useMaterialThemeColors="false"
app:buttonTint="@color/white"/>
@ -73,7 +73,7 @@
android:layout_marginBottom="1dp"
android:drawableEnd="@drawable/waveform"
android:drawableTint="@color/white"
android:checked="@{viewModel.conferenceLayout == ConferenceModel.AUDIO_ONLY_LAYOUT}"
android:checked="@{viewModel.conferenceLayout == ConferenceViewModel.AUDIO_ONLY_LAYOUT}"
app:useMaterialThemeColors="false"
app:buttonTint="@color/white"/>

View file

@ -13,7 +13,7 @@
type="View.OnLongClickListener" />
<variable
name="model"
type="org.linphone.ui.call.model.ConferenceParticipantModel" />
type="org.linphone.ui.call.conference.model.ConferenceParticipantModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout

View file

@ -309,14 +309,16 @@
android:id="@+id/unread_messages"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="-13dp"
android:layout_marginStart="-11dp"
android:gravity="center"
android:background="@drawable/shape_red_round"
android:text="@{String.valueOf(viewModel.unreadMessagesCount), default=`1`}"
android:textColor="?attr/color_on_main"
android:textSize="13sp"
android:visibility="@{viewModel.isUserScrollingUp &amp;&amp; viewModel.unreadMessagesCount > 0 ? View.VISIBLE : View.GONE}"
app:layout_constraintBottom_toTopOf="@id/scroll_to_bottom"
app:layout_constraintEnd_toEndOf="@id/scroll_to_bottom"/>
app:layout_constraintTop_toTopOf="@id/scroll_to_bottom"
app:layout_constraintStart_toEndOf="@id/scroll_to_bottom"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -130,7 +130,7 @@
<fragment
android:id="@+id/activeConferenceCallFragment"
android:name="org.linphone.ui.call.fragment.ActiveConferenceCallFragment"
android:name="org.linphone.ui.call.conference.fragment.ActiveConferenceCallFragment"
android:label="ActiveConferenceCallFragment"
tools:layout="@layout/call_active_conference_fragment">
<action
@ -161,9 +161,16 @@
<fragment
android:id="@+id/conferenceParticipantsListFragment"
android:name="org.linphone.ui.call.fragment.ConferenceParticipantsListFragment"
android:name="org.linphone.ui.call.conference.fragment.ConferenceParticipantsListFragment"
android:label="ConferenceParticipantsListFragment"
tools:layout="@layout/call_conference_participants_list_fragment"/>
tools:layout="@layout/call_conference_participants_list_fragment">
<action
android:id="@+id/action_conferenceParticipantsListFragment_to_conferenceAddParticipantsFragment"
app:destination="@id/conferenceAddParticipantsFragment"
app:enterAnim="@anim/slide_in"
app:popExitAnim="@anim/slide_out"
app:launchSingleTop="true" />
</fragment>
<fragment
android:id="@+id/inCallConversationFragment"
@ -178,4 +185,10 @@
app:argType="string" />
</fragment>
<fragment
android:id="@+id/conferenceAddParticipantsFragment"
android:name="org.linphone.ui.call.conference.fragment.ConferenceAddParticipantsFragment"
android:label="ConferenceAddParticipantsFragment"
tools:layout="@layout/generic_add_participants_fragment"/>
</navigation>

View file

@ -7,7 +7,7 @@
<fragment
android:id="@+id/conferenceGridFragment"
android:name="org.linphone.ui.call.fragment.ConferenceGridFragment"
android:name="org.linphone.ui.call.conference.fragment.ConferenceGridFragment"
android:label="ConferenceGridFragment"
tools:layout="@layout/call_conference_grid_fragment">
<action
@ -26,7 +26,7 @@
<fragment
android:id="@+id/conferenceActiveSpeakerFragment"
android:name="org.linphone.ui.call.fragment.ConferenceActiveSpeakerFragment"
android:name="org.linphone.ui.call.conference.fragment.ConferenceActiveSpeakerFragment"
android:label="ConferenceActiveSpeakerFragment"
tools:layout="@layout/call_conference_active_speaker_fragment">
<action
@ -44,7 +44,7 @@
</fragment>
<fragment
android:id="@+id/conferenceAudioOnlyFragment"
android:name="org.linphone.ui.call.fragment.ConferenceAudioOnlyFragment"
android:name="org.linphone.ui.call.conference.fragment.ConferenceAudioOnlyFragment"
android:label="ConferenceAudioOnlyFragment"
tools:layout="@layout/call_conference_audio_only_fragment">
<action