mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-17 14:30:40 +01:00
Merge branch 'krille/fix-reactions' into 'main'
fix: Chat view becomes gray for a second on sending reaction See merge request famedly/fluffychat!789
This commit is contained in:
commit
2f18fb7bc4
@ -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…
x
Reference in New Issue
Block a user