Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/tchap_v1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
giomfo committed Apr 2, 2021
2 parents 8e8f824 + 07f7a82 commit 4d9e6aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
6 changes: 6 additions & 0 deletions TCHAP_CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Changes in Tchap 1.2.1 (2021-04-02)
===================================================

Bug Fix:
* Some last message are missing in the rooms list (PR #707)

Changes in Tchap 1.2.0 (2021-03-24)
===================================================

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ buildscript {

// global properties used in sub modules
ext {
versionCodeProp = 78
versionNameProp = "1.2.0"
versionCodeProp = 79
versionNameProp = "1.2.1"
versionBuild = System.getenv("BUILD_NUMBER") as Integer ?: 0
buildNumberProp = "${versionBuild}"
}
Expand Down
16 changes: 10 additions & 6 deletions vector/src/main/java/im/vector/util/RoomUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -390,14 +390,18 @@ public static CharSequence getRoomMessageToDisplay(final Context context,
if (retentionInDays != RoomRetentionKt.UNDEFINED_RETENTION_VALUE) {
long retentionDurationMs = TimeUnit.DAYS.toMillis(retentionInDays);
long eventLifetime = System.currentTimeMillis() - latestEvent.getOriginServerTs();
if (eventLifetime <= retentionDurationMs) {
eventDisplay = new EventDisplay(context);
eventDisplay.setPrependMessagesWithAuthor(false);
messageToDisplay = eventDisplay.getTextualDisplay(ThemeUtils.INSTANCE.getColor(context, R.attr.vctr_room_notification_text_color),
latestEvent,
roomSummary.getLatestRoomState());
if (eventLifetime > retentionDurationMs) {
latestEvent = null;
}
}

if (latestEvent != null) {
eventDisplay = new EventDisplay(context);
eventDisplay.setPrependMessagesWithAuthor(false);
messageToDisplay = eventDisplay.getTextualDisplay(ThemeUtils.INSTANCE.getColor(context, R.attr.vctr_room_notification_text_color),
latestEvent,
roomSummary.getLatestRoomState());
}
}
}

Expand Down

0 comments on commit 4d9e6aa

Please sign in to comment.