Hide scheduled meeting description if empty in summary + fix description textfield title in summary + fixed issue with avatars
This commit is contained in:
parent
24c653d039
commit
a6b3b33587
4 changed files with 15 additions and 4 deletions
|
@ -34,6 +34,7 @@ import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.constraintlayout.widget.Guideline
|
import androidx.constraintlayout.widget.Guideline
|
||||||
import androidx.databinding.*
|
import androidx.databinding.*
|
||||||
|
import coil.dispose
|
||||||
import coil.load
|
import coil.load
|
||||||
import coil.request.CachePolicy
|
import coil.request.CachePolicy
|
||||||
import coil.request.videoFrameMillis
|
import coil.request.videoFrameMillis
|
||||||
|
@ -344,6 +345,8 @@ private suspend fun loadContactPictureWithCoil(
|
||||||
textColor: Int = 0,
|
textColor: Int = 0,
|
||||||
defaultAvatar: String? = null
|
defaultAvatar: String? = null
|
||||||
) {
|
) {
|
||||||
|
imageView.dispose()
|
||||||
|
|
||||||
val context = imageView.context
|
val context = imageView.context
|
||||||
if (contact == null) {
|
if (contact == null) {
|
||||||
if (defaultAvatar != null) {
|
if (defaultAvatar != null) {
|
||||||
|
@ -351,7 +354,7 @@ private suspend fun loadContactPictureWithCoil(
|
||||||
transformations(CircleCropTransformation())
|
transformations(CircleCropTransformation())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
imageView.load(R.drawable.icon_single_contact_avatar)
|
imageView.load(R.drawable.icon_single_contact_avatar_alt)
|
||||||
}
|
}
|
||||||
} else if (contact.showGroupChatAvatar) {
|
} else if (contact.showGroupChatAvatar) {
|
||||||
imageView.load(AppCompatResources.getDrawable(context, R.drawable.icon_multiple_contacts_avatar))
|
imageView.load(AppCompatResources.getDrawable(context, R.drawable.icon_multiple_contacts_avatar))
|
||||||
|
@ -363,7 +366,7 @@ private suspend fun loadContactPictureWithCoil(
|
||||||
transformations(CircleCropTransformation())
|
transformations(CircleCropTransformation())
|
||||||
error(
|
error(
|
||||||
if (displayName.isEmpty() || AppUtils.getInitials(displayName) == "+") {
|
if (displayName.isEmpty() || AppUtils.getInitials(displayName) == "+") {
|
||||||
AppCompatResources.getDrawable(context, R.drawable.icon_single_contact_avatar)
|
AppCompatResources.getDrawable(context, R.drawable.icon_single_contact_avatar_alt)
|
||||||
} else {
|
} else {
|
||||||
coroutineScope {
|
coroutineScope {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<bitmap android:src="@drawable/voip_single_contact_avatar_alt_2"
|
||||||
|
android:tint="?attr/drawableTintColor"/>
|
||||||
|
</item>
|
||||||
|
</selector>
|
|
@ -234,13 +234,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
android:layout_margin="5dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:visibility="@{viewModel.description.length() == 0 ? View.GONE : View.VISIBLE}">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/conference_scheduling_font"
|
style="@style/conference_scheduling_font"
|
||||||
android:text="@string/conference_schedule_description_title"/>
|
android:text="@string/conference_schedule_description_hint"/>
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue