mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Updated gradle to 8.1.3, added missing input type to chat text field & correct default icon for group chat rooms
This commit is contained in:
parent
e61a6a0b7f
commit
8cbe832a67
9 changed files with 25 additions and 14 deletions
|
|
@ -12,5 +12,7 @@ abstract class AbstractAvatarModel {
|
|||
|
||||
val images = MutableLiveData<ArrayList<String>>()
|
||||
|
||||
val showConferenceIcon = MutableLiveData<Boolean>()
|
||||
val forceConferenceIcon = MutableLiveData<Boolean>()
|
||||
|
||||
val defaultToConferenceIcon = MutableLiveData<Boolean>()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class CallModel @WorkerThread constructor(val call: Call) {
|
|||
val conferenceInfo = coreContext.core.findConferenceInformationFromUri(call.remoteAddress)
|
||||
if (conferenceInfo != null) {
|
||||
displayName.postValue(conferenceInfo.subject)
|
||||
avatarModel.showConferenceIcon.postValue(true)
|
||||
avatarModel.forceConferenceIcon.postValue(true)
|
||||
} else {
|
||||
displayName.postValue(friend?.name ?: LinphoneUtils.getDisplayName(call.remoteAddress))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -798,7 +798,7 @@ class CurrentCallViewModel @UiThread constructor() : ViewModel() {
|
|||
fakeFriend.name = conferenceInfo?.subject ?: LinphoneUtils.getDisplayName(address)
|
||||
fakeFriend.addAddress(address)
|
||||
val model = ContactAvatarModel(fakeFriend)
|
||||
model.showConferenceIcon.postValue(conferenceInfo != null)
|
||||
model.forceConferenceIcon.postValue(conferenceInfo != null)
|
||||
model.trust.postValue(securityLevel)
|
||||
contact.postValue(model)
|
||||
displayedName.postValue(fakeFriend.name)
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ class ConversationModel @WorkerThread constructor(val chatRoom: ChatRoom) {
|
|||
if (isGroup) {
|
||||
val fakeFriend = coreContext.core.createFriend()
|
||||
val model = ContactAvatarModel(fakeFriend)
|
||||
model.defaultToConferenceIcon.postValue(true)
|
||||
model.setPicturesFromFriends(friends)
|
||||
avatarModel.postValue(model)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class CallLogModel @WorkerThread constructor(private val callLog: CallLog) {
|
|||
}
|
||||
avatarModel = ContactAvatarModel(fakeFriend)
|
||||
|
||||
avatarModel.showConferenceIcon.postValue(true)
|
||||
avatarModel.forceConferenceIcon.postValue(true)
|
||||
friendRefKey = null
|
||||
friendExists = false
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class ContactHistoryViewModel @UiThread constructor() : ViewModel() {
|
|||
val conferenceInfo = coreContext.core.findConferenceInformationFromUri(address)
|
||||
if (conferenceInfo != null) {
|
||||
model.avatarModel.name.postValue(conferenceInfo.subject)
|
||||
model.avatarModel.showConferenceIcon.postValue(true)
|
||||
model.avatarModel.forceConferenceIcon.postValue(true)
|
||||
}
|
||||
|
||||
callLogModel.postValue(model)
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ private suspend fun loadContactPictureWithCoil(
|
|||
|
||||
val context = imageView.context
|
||||
if (model != null) {
|
||||
if (model.showConferenceIcon.value == true) {
|
||||
if (model.forceConferenceIcon.value == true) {
|
||||
imageView.load(
|
||||
ResourcesCompat.getDrawable(
|
||||
context.resources,
|
||||
|
|
@ -406,11 +406,19 @@ private suspend fun loadContactPictureWithCoil(
|
|||
withContext(Dispatchers.IO) {
|
||||
val initials = model.initials.value.orEmpty()
|
||||
if (initials.isEmpty() || initials == "+") {
|
||||
ResourcesCompat.getDrawable(
|
||||
context.resources,
|
||||
R.drawable.user_circle,
|
||||
context.theme
|
||||
)
|
||||
if (model.defaultToConferenceIcon.value == true) {
|
||||
ResourcesCompat.getDrawable(
|
||||
context.resources,
|
||||
R.drawable.inset_users_three,
|
||||
context.theme
|
||||
)
|
||||
} else {
|
||||
ResourcesCompat.getDrawable(
|
||||
context.resources,
|
||||
R.drawable.inset_user_circle,
|
||||
context.theme
|
||||
)
|
||||
}
|
||||
} else {
|
||||
val builder = AvatarGenerator(context)
|
||||
builder.setInitials(model.initials.value.orEmpty())
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
android:textColorHint="@color/gray_main2_400"
|
||||
android:maxLines="3"
|
||||
android:hint="@string/conversation_text_field_hint"
|
||||
android:inputType="text"
|
||||
android:inputType="text|textCapSentences|textAutoCorrect"
|
||||
app:layout_constraintTop_toBottomOf="@id/emoji_picker"
|
||||
app:layout_constraintStart_toStartOf="@id/message_area_background"
|
||||
app:layout_constraintEnd_toStartOf="@id/send_barrier"
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ buildscript {
|
|||
}
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '8.1.2' apply false
|
||||
id 'com.android.library' version '8.1.2' apply false
|
||||
id 'com.android.application' version '8.1.3' apply false
|
||||
id 'com.android.library' version '8.1.3' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.9.0-RC' apply false
|
||||
id 'com.google.gms.google-services' version '4.3.15' apply false
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue