Fixes space avatar not rendering
This commit is contained in:
parent
f5851a0bf8
commit
89db0645a5
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package im.vector.app.features.home
|
package im.vector.app.features.home
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
@ -73,6 +74,15 @@ class AvatarRenderer @Inject constructor(private val activeSessionHolder: Active
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@UiThread
|
||||||
|
fun render(matrixItem: MatrixItem, context: Context, imageView: ImageView) {
|
||||||
|
render(
|
||||||
|
GlideApp.with(context),
|
||||||
|
matrixItem,
|
||||||
|
DrawableImageViewTarget(imageView)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// fun renderSpace(matrixItem: MatrixItem, imageView: ImageView) {
|
// fun renderSpace(matrixItem: MatrixItem, imageView: ImageView) {
|
||||||
// renderSpace(
|
// renderSpace(
|
||||||
// matrixItem,
|
// matrixItem,
|
||||||
|
@ -391,7 +391,7 @@ class HomeDetailFragment @Inject constructor(
|
|||||||
views.groupToolbarSpaceTitleView.text = spaceSummary.displayName
|
views.groupToolbarSpaceTitleView.text = spaceSummary.displayName
|
||||||
views.groupToolbarTitleView.text = spaceSummary.displayName
|
views.groupToolbarTitleView.text = spaceSummary.displayName
|
||||||
views.spaceAvatar.isVisible = true
|
views.spaceAvatar.isVisible = true
|
||||||
avatarRenderer.render(spaceSummary.toMatrixItem(), views.spaceAvatar)
|
avatarRenderer.render(spaceSummary.toMatrixItem(), requireContext(), views.spaceAvatar)
|
||||||
ImageViewCompat.setImageTintList(views.toolbarChevron, ColorStateList.valueOf(MaterialColors.getColor(views.toolbarChevron, R.attr.vctr_message_text_color)))
|
ImageViewCompat.setImageTintList(views.toolbarChevron, ColorStateList.valueOf(MaterialColors.getColor(views.toolbarChevron, R.attr.vctr_message_text_color)))
|
||||||
|
|
||||||
spaceSummary.spaceParents?.firstOrNull()?.let { directParent ->
|
spaceSummary.spaceParents?.firstOrNull()?.let { directParent ->
|
||||||
|
Loading…
Reference in New Issue
Block a user