From cbe093fe7731ecb78e565f19a63d381a3d6fedd8 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 20 Aug 2020 18:20:53 +0200 Subject: [PATCH] Highlighted Event when opening a permalink from another room (Fixes #1033) --- CHANGES.md | 1 + .../app/features/home/room/detail/RoomDetailViewState.kt | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 34ffdbcfd6..959fde7172 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,6 +21,7 @@ Bugfix 🐛: - Fix crash reported by RageShake - Fix refreshing of sessions list when another session is logged out - Failed to build unique file (#1954) + - Highlighted Event when opening a permalink from another room (#1033) Translations 🗣: - Add PlayStore description resources in the Triple-T format, to let Weblate handle them diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt index c2bffa4362..a031803fa6 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt @@ -70,5 +70,10 @@ data class RoomDetailViewState( val isAllowedToManageWidgets: Boolean = false ) : MvRxState { - constructor(args: RoomDetailArgs) : this(roomId = args.roomId, eventId = args.eventId) + constructor(args: RoomDetailArgs) : this( + roomId = args.roomId, + eventId = args.eventId, + // Also highlight the target event, if any + highlightedEventId = args.eventId + ) }