mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-26 20:14:28 +01:00
fix: Chat view becomes gray for a second on sending reaction
This commit is contained in:
parent
d2d76ffd6e
commit
c6ce213ebb
@ -22,12 +22,14 @@ class MessageReactions extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final allReactionEvents =
|
final allReactionEvents =
|
||||||
event.aggregatedEvents(timeline, RelationshipTypes.reaction);
|
event.aggregatedEvents(timeline, RelationshipTypes.reaction);
|
||||||
final reactionMap = <String?, _ReactionEntry>{};
|
final reactionMap = <String, _ReactionEntry>{};
|
||||||
final client = Matrix.of(context).client;
|
final client = Matrix.of(context).client;
|
||||||
|
|
||||||
for (final e in allReactionEvents) {
|
for (final e in allReactionEvents) {
|
||||||
if (e.content['m.relates_to'].containsKey('key')) {
|
final key = e.content
|
||||||
final key = e.content['m.relates_to']['key'];
|
.tryGetMap<String, dynamic>('m.relates_to')
|
||||||
|
?.tryGet<String>('key');
|
||||||
|
if (key != null) {
|
||||||
if (!reactionMap.containsKey(key)) {
|
if (!reactionMap.containsKey(key)) {
|
||||||
reactionMap[key] = _ReactionEntry(
|
reactionMap[key] = _ReactionEntry(
|
||||||
key: key,
|
key: key,
|
||||||
|
Loading…
Reference in New Issue
Block a user