mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Updated picto in calls history when call log was for a conference
This commit is contained in:
parent
8870564066
commit
e6d5e35f29
2 changed files with 10 additions and 7 deletions
|
|
@ -31,10 +31,12 @@ class CallLogModel @WorkerThread constructor(private val callLog: CallLog) {
|
|||
|
||||
val avatarModel: ContactAvatarModel
|
||||
|
||||
@IntegerRes
|
||||
val iconResId = MutableLiveData<Int>()
|
||||
val wasConference: Boolean
|
||||
|
||||
val dateTime = MutableLiveData<String>()
|
||||
@IntegerRes
|
||||
val iconResId: Int
|
||||
|
||||
val dateTime: String
|
||||
|
||||
val friendRefKey: String?
|
||||
|
||||
|
|
@ -49,9 +51,10 @@ class CallLogModel @WorkerThread constructor(private val callLog: CallLog) {
|
|||
TimestampUtils.toString(timestamp, onlyDate = true, shortDate = true, hideYear = true)
|
||||
}
|
||||
val time = TimestampUtils.timeToString(timestamp)
|
||||
dateTime.postValue("$date | $time")
|
||||
dateTime = "$date | $time"
|
||||
|
||||
if (callLog.wasConference()) {
|
||||
wasConference = callLog.wasConference()
|
||||
if (wasConference) {
|
||||
val conferenceInfo = coreContext.core.findConferenceInformationFromUri(address)
|
||||
if (conferenceInfo != null) {
|
||||
avatarModel = coreContext.contactsManager.getContactAvatarModelForConferenceInfo(
|
||||
|
|
@ -78,7 +81,7 @@ class CallLogModel @WorkerThread constructor(private val callLog: CallLog) {
|
|||
}
|
||||
displayedAddress = avatarModel.friend.address?.asStringUriOnly() ?: address.asStringUriOnly()
|
||||
|
||||
iconResId.postValue(LinphoneUtils.getCallIconResId(callLog.status, callLog.dir))
|
||||
iconResId = LinphoneUtils.getCallIconResId(callLog.status, callLog.dir)
|
||||
}
|
||||
|
||||
@UiThread
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
android:layout_width="@dimen/icon_size"
|
||||
android:layout_height="@dimen/icon_size"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:src="@drawable/phone"
|
||||
android:src="@{model.wasConference ? @drawable/meeting : @drawable/phone, default=@drawable/phone}"
|
||||
app:tint="?attr/color_main2_500"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/name"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue