Compare commits

...

7 Commits

Author SHA1 Message Date
bd88d85a21 Merge branch 'develop' into feature/fix_441 2019-08-27 04:35:17 -04:00
be4fc5cce6 Merge pull request #493 from vector-im/feature/fix_358
Date change message repeats for each redaction until a normal message
2019-08-27 04:34:35 -04:00
704da1be55 Merge branch 'develop' into feature/fix_358 2019-08-27 04:34:24 -04:00
5d002532d3 Merge pull request #495 from vector-im/feature/fix_423
Slide-in reply icon is distorted
2019-08-27 04:22:02 -04:00
d4161e9a1a Fix text diff removed linebreak 2019-08-27 10:17:42 +02:00
7966ebef03 Date change message repeats for each redaction until a normal message 2019-08-27 10:16:11 +02:00
ed5faca5d2 Slide-in reply icon is distorted 2019-08-27 10:06:20 +02:00
5 changed files with 16 additions and 12 deletions

View File

@ -11,7 +11,9 @@ 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:
-

View File

@ -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

View File

@ -113,7 +113,7 @@ class ViewEditHistoryEpoxyController(private val context: Context,
when (it.operation) {
diff_match_patch.Operation.DELETE -> {
span {
text = it.text
text = it.text.replace("\n"," ")
textColor = ContextCompat.getColor(context, R.color.vector_error_color)
textDecorationLine = "line-through"
}

View File

@ -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

View File

@ -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