From 3ee20eb07c285168d769aca6c9fa8210098a638e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Mon, 5 Oct 2020 01:28:34 +0000 Subject: [PATCH] fix replying to wrong message when new message arrives during the gesture --- lib/views/chat.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/views/chat.dart b/lib/views/chat.dart index f86fb6b..9cce68f 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -677,7 +677,8 @@ class _ChatState extends State<_Chat> { index: i - 1, controller: _scrollController, child: Swipeable( - key: ValueKey(i - 1), + key: ValueKey( + filteredEvents[i - 1].eventId), background: Container( color: Theme.of(context) .primaryColor