mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 02:45:53 +03:00
Open room member profile from avatar of the room member state event.
This commit is contained in:
parent
dcb618c257
commit
b187699a86
3 changed files with 8 additions and 2 deletions
|
@ -8,6 +8,7 @@ Improvements 🙌:
|
||||||
- Add support for `/plain` command (#12)
|
- Add support for `/plain` command (#12)
|
||||||
- Detect spaces in password if user fail to login (#1038)
|
- Detect spaces in password if user fail to login (#1038)
|
||||||
- FTUE: do not display a different color when encrypting message when not in developer mode.
|
- FTUE: do not display a different color when encrypting message when not in developer mode.
|
||||||
|
- Open room member profile from avatar of the room member state event (#935)
|
||||||
|
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
- Fix crash on attachment preview screen (#1088)
|
- Fix crash on attachment preview screen (#1088)
|
||||||
|
|
|
@ -44,7 +44,8 @@ class NoticeItemFactory @Inject constructor(private val eventFormatter: NoticeEv
|
||||||
itemLongClickListener = View.OnLongClickListener { view ->
|
itemLongClickListener = View.OnLongClickListener { view ->
|
||||||
callback?.onEventLongClicked(informationData, null, view) ?: false
|
callback?.onEventLongClicked(informationData, null, view) ?: false
|
||||||
},
|
},
|
||||||
readReceiptsCallback = callback
|
readReceiptsCallback = callback,
|
||||||
|
avatarClickListener = { callback?.onAvatarClicked(informationData) }
|
||||||
)
|
)
|
||||||
return NoticeItem_()
|
return NoticeItem_()
|
||||||
.leftGuideline(avatarSizeProvider.leftGuideline)
|
.leftGuideline(avatarSizeProvider.leftGuideline)
|
||||||
|
|
|
@ -22,6 +22,8 @@ import android.widget.TextView
|
||||||
import com.airbnb.epoxy.EpoxyAttribute
|
import com.airbnb.epoxy.EpoxyAttribute
|
||||||
import com.airbnb.epoxy.EpoxyModelClass
|
import com.airbnb.epoxy.EpoxyModelClass
|
||||||
import im.vector.riotx.R
|
import im.vector.riotx.R
|
||||||
|
import im.vector.riotx.core.epoxy.ClickListener
|
||||||
|
import im.vector.riotx.core.epoxy.onClick
|
||||||
import im.vector.riotx.core.utils.DebouncedClickListener
|
import im.vector.riotx.core.utils.DebouncedClickListener
|
||||||
import im.vector.riotx.features.home.AvatarRenderer
|
import im.vector.riotx.features.home.AvatarRenderer
|
||||||
import im.vector.riotx.features.home.room.detail.timeline.TimelineEventController
|
import im.vector.riotx.features.home.room.detail.timeline.TimelineEventController
|
||||||
|
@ -42,6 +44,7 @@ abstract class NoticeItem : BaseEventItem<NoticeItem.Holder>() {
|
||||||
attributes.avatarRenderer.render(attributes.informationData.matrixItem, holder.avatarImageView)
|
attributes.avatarRenderer.render(attributes.informationData.matrixItem, holder.avatarImageView)
|
||||||
holder.view.setOnLongClickListener(attributes.itemLongClickListener)
|
holder.view.setOnLongClickListener(attributes.itemLongClickListener)
|
||||||
holder.readReceiptsView.render(attributes.informationData.readReceipts, attributes.avatarRenderer, _readReceiptsClickListener)
|
holder.readReceiptsView.render(attributes.informationData.readReceipts, attributes.avatarRenderer, _readReceiptsClickListener)
|
||||||
|
holder.avatarImageView.onClick(attributes.avatarClickListener)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getEventIds(): List<String> {
|
override fun getEventIds(): List<String> {
|
||||||
|
@ -60,7 +63,8 @@ abstract class NoticeItem : BaseEventItem<NoticeItem.Holder>() {
|
||||||
val informationData: MessageInformationData,
|
val informationData: MessageInformationData,
|
||||||
val noticeText: CharSequence,
|
val noticeText: CharSequence,
|
||||||
val itemLongClickListener: View.OnLongClickListener? = null,
|
val itemLongClickListener: View.OnLongClickListener? = null,
|
||||||
val readReceiptsCallback: TimelineEventController.ReadReceiptsCallback? = null
|
val readReceiptsCallback: TimelineEventController.ReadReceiptsCallback? = null,
|
||||||
|
val avatarClickListener: ClickListener? = null
|
||||||
)
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
Loading…
Reference in a new issue