mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Hiding conversations & meetings for now
This commit is contained in:
parent
4018155899
commit
c2a74df26d
10 changed files with 37 additions and 15 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -13,3 +13,5 @@
|
|||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
app/debug/
|
||||
app/release/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ dependencies {
|
|||
implementation 'androidx.core:core-ktx:1.10.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0-alpha03'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.7.0'
|
||||
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.3.1'
|
||||
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0"
|
||||
|
||||
|
|
@ -69,9 +67,6 @@ dependencies {
|
|||
// https://github.com/material-components/material-components-android/blob/master/LICENSE Apache v2.0
|
||||
implementation 'com.google.android.material:material:1.9.0'
|
||||
|
||||
// https://github.com/google/flexbox-layout/blob/main/LICENSE Apache v2.0
|
||||
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
||||
|
||||
// https://github.com/coil-kt/coil/blob/main/LICENSE.txt Apache v2.0
|
||||
def coil_version = "2.4.0"
|
||||
implementation("io.coil-kt:coil:$coil_version")
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@ class CorePreferences constructor(private val context: Context) {
|
|||
config.setBool("app", "publish_presence", value)
|
||||
}
|
||||
|
||||
// Will disable chat feature completely
|
||||
val disableChat: Boolean
|
||||
get() = config.getBool("app", "disable_chat_feature", false)
|
||||
|
||||
val defaultDomain: String
|
||||
get() = config.getString("app", "default_domain", "sip.linphone.org")!!
|
||||
|
||||
|
|
|
|||
|
|
@ -116,11 +116,11 @@ class ContactViewModel : ViewModel() {
|
|||
|
||||
val organization = friend.organization
|
||||
if (!organization.isNullOrEmpty()) {
|
||||
company.postValue(organization)
|
||||
company.postValue(organization!!)
|
||||
}
|
||||
val jobTitle = friend.jobTitle
|
||||
if (!jobTitle.isNullOrEmpty()) {
|
||||
title.postValue(jobTitle)
|
||||
title.postValue(jobTitle!!)
|
||||
}
|
||||
|
||||
val addressesAndNumbers = arrayListOf<ContactNumberOrAddressModel>()
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.R
|
||||
import org.linphone.contacts.ContactsSelectionAdapter
|
||||
import org.linphone.databinding.NewConversationFragmentBinding
|
||||
import org.linphone.databinding.ConversationStartFragmentBinding
|
||||
import org.linphone.ui.main.conversations.viewmodel.NewConversationViewModel
|
||||
|
||||
class NewConversationFragment : Fragment() {
|
||||
private lateinit var binding: NewConversationFragmentBinding
|
||||
private lateinit var binding: ConversationStartFragmentBinding
|
||||
private lateinit var adapter: ContactsSelectionAdapter
|
||||
private val viewModel: NewConversationViewModel by navGraphViewModels(
|
||||
R.id.conversationsFragment
|
||||
|
|
@ -56,7 +56,7 @@ class NewConversationFragment : Fragment() {
|
|||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = NewConversationFragmentBinding.inflate(layoutInflater)
|
||||
binding = ConversationStartFragmentBinding.inflate(layoutInflater)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||
import org.linphone.R
|
||||
import org.linphone.databinding.BottomNavBarBinding
|
||||
import org.linphone.ui.main.viewmodel.SharedMainViewModel
|
||||
|
|
@ -87,5 +88,8 @@ class BottomNavBarFragment : Fragment() {
|
|||
binding.callsSelected = it == R.id.callsFragment
|
||||
binding.conversationsSelected = it == R.id.conversationsFragment
|
||||
}
|
||||
|
||||
binding.hideConversations = corePreferences.disableChat || true // TODO
|
||||
binding.hideMeetings = true // TODO
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@
|
|||
<variable
|
||||
name="meetingsSelected"
|
||||
type="Boolean" />
|
||||
<variable
|
||||
name="hideConversations"
|
||||
type="Boolean" />
|
||||
<variable
|
||||
name="hideMeetings"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -61,6 +67,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/calls"
|
||||
android:drawableTint="@{callsSelected ? @color/primary_color : @color/gray_9, default=@color/gray_9}"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="Calls"
|
||||
android:textStyle="@{callsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
||||
|
|
@ -72,6 +79,7 @@
|
|||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/bottom_nav_bar_label_style"
|
||||
android:id="@+id/conversations"
|
||||
android:visibility="@{hideConversations ? View.GONE : View.VISIBLE}"
|
||||
android:enabled="false"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -90,6 +98,7 @@
|
|||
style="@style/bottom_nav_bar_label_style"
|
||||
android:onClick="@{onMeetingsClicked}"
|
||||
android:id="@+id/meetings"
|
||||
android:visibility="@{hideMeetings ? View.GONE : View.VISIBLE}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/meetings"
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@
|
|||
<variable
|
||||
name="meetingsSelected"
|
||||
type="Boolean" />
|
||||
<variable
|
||||
name="hideConversations"
|
||||
type="Boolean" />
|
||||
<variable
|
||||
name="hideMeetings"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -48,8 +54,8 @@
|
|||
android:paddingBottom="16dp"
|
||||
android:drawableTop="@drawable/contacts"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="Contacts"
|
||||
android:drawableTint="@{contactsSelected ? @color/primary_color : @color/gray_9, default=@color/gray_9}"
|
||||
android:text="Contacts"
|
||||
android:textStyle="@{contactsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/calls"
|
||||
|
|
@ -67,8 +73,8 @@
|
|||
android:paddingBottom="16dp"
|
||||
android:drawableTop="@drawable/calls"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="Calls"
|
||||
android:drawableTint="@{callsSelected ? @color/primary_color : @color/gray_9, default=@color/gray_9}"
|
||||
android:text="Calls"
|
||||
android:textStyle="@{callsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/conversations"
|
||||
|
|
@ -78,6 +84,7 @@
|
|||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/bottom_nav_bar_label_style"
|
||||
android:onClick="@{onConversationsClicked}"
|
||||
android:visibility="@{hideConversations ? View.GONE : View.VISIBLE}"
|
||||
android:enabled="false"
|
||||
android:id="@+id/conversations"
|
||||
android:layout_width="0dp"
|
||||
|
|
@ -87,8 +94,8 @@
|
|||
android:paddingBottom="16dp"
|
||||
android:drawableTop="@drawable/conversations"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="Conversations"
|
||||
android:drawableTint="@{conversationsSelected ? @color/primary_color : @color/gray_9, default=@color/gray_9}"
|
||||
android:text="Conversations"
|
||||
android:textStyle="@{conversationsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/meetings"
|
||||
|
|
@ -99,6 +106,7 @@
|
|||
style="@style/bottom_nav_bar_label_style"
|
||||
android:onClick="@{onMeetingsClicked}"
|
||||
android:id="@+id/meetings"
|
||||
android:visibility="@{hideMeetings ? View.GONE : View.VISIBLE}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
|
|
@ -106,8 +114,8 @@
|
|||
android:paddingBottom="16dp"
|
||||
android:drawableTop="@drawable/meetings"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="Meetings"
|
||||
android:drawableTint="@{meetingsSelected ? @color/primary_color : @color/gray_9, default=@color/gray_9}"
|
||||
android:text="Meetings"
|
||||
android:textStyle="@{meetingsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
android:id="@+id/newConversationFragment"
|
||||
android:name="org.linphone.ui.main.conversations.NewConversationFragment"
|
||||
android:label="NewConversationFragment"
|
||||
tools:layout="@layout/new_conversation_fragment" >
|
||||
tools:layout="@layout/conversation_start_fragment" >
|
||||
<action
|
||||
android:id="@+id/action_newConversationFragment_to_conversationFragment"
|
||||
app:destination="@id/conversationFragment"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue