forked from GitHub-Mirror/riotX-android
Merge branch 'develop' into feature/fix_441
This commit is contained in:
commit
bd88d85a21
@ -12,6 +12,8 @@ Other changes:
|
||||
|
||||
Bugfix:
|
||||
- Fix text diff linebreak display (#441)
|
||||
- Date change message repeats for each redaction until a normal message (#358)
|
||||
- Slide-in reply icon is distorted (#423)
|
||||
|
||||
Translations:
|
||||
-
|
||||
|
@ -191,12 +191,13 @@ class RoomMessageTouchHelperCallback(private val context: Context,
|
||||
}
|
||||
|
||||
val y = (itemView.top + itemView.measuredHeight / 2).toFloat()
|
||||
//magic numbers?
|
||||
val hw = imageDrawable.intrinsicWidth / 2f
|
||||
val hh = imageDrawable.intrinsicHeight / 2f
|
||||
imageDrawable.setBounds(
|
||||
(x - convertToPx(12) * scale).toInt(),
|
||||
(y - convertToPx(11) * scale).toInt(),
|
||||
(x + convertToPx(12) * scale).toInt(),
|
||||
(y + convertToPx(10) * scale).toInt()
|
||||
(x - hw * scale).toInt(),
|
||||
(y - hh * scale).toInt(),
|
||||
(x + hw * scale).toInt(),
|
||||
(y + hh * scale).toInt()
|
||||
)
|
||||
imageDrawable.draw(canvas)
|
||||
imageDrawable.alpha = 255
|
||||
|
@ -56,7 +56,8 @@ fun TimelineEvent.isDisplayable(showHiddenEvent: Boolean): Boolean {
|
||||
return false
|
||||
}
|
||||
if (root.content.isNullOrEmpty()) {
|
||||
return false
|
||||
//redacted events have empty content but are displayable
|
||||
return root.unsignedData?.redactedEvent != null
|
||||
}
|
||||
//Edits should be filtered out!
|
||||
if (EventType.MESSAGE == root.type
|
||||
|
@ -50,10 +50,10 @@ class MessageInformationDataFactory @Inject constructor(private val session: Ses
|
||||
|
||||
val showInformation =
|
||||
addDaySeparator
|
||||
|| event.senderAvatar != nextEvent?.senderAvatar
|
||||
|| event.getDisambiguatedDisplayName() != nextEvent?.getDisambiguatedDisplayName()
|
||||
|| (nextEvent.root.getClearType() != EventType.MESSAGE && nextEvent.root.getClearType() != EventType.ENCRYPTED)
|
||||
|| isNextMessageReceivedMoreThanOneHourAgo
|
||||
|| event.senderAvatar != nextEvent?.senderAvatar
|
||||
|| event.getDisambiguatedDisplayName() != nextEvent?.getDisambiguatedDisplayName()
|
||||
|| (nextEvent.root.getClearType() != EventType.MESSAGE && nextEvent.root.getClearType() != EventType.ENCRYPTED)
|
||||
|| isNextMessageReceivedMoreThanOneHourAgo
|
||||
|
||||
val time = dateFormatter.formatMessageHour(date)
|
||||
val avatarUrl = event.senderAvatar
|
||||
|
Loading…
Reference in New Issue
Block a user