forked from Nexus/nexus
potential loading time optimization
This commit is contained in:
parent
e9b78a14d5
commit
07decc10e2
1 changed files with 11 additions and 9 deletions
|
|
@ -68,15 +68,17 @@ class MessageController extends AsyncNotifier<Message?> {
|
||||||
final replyId =
|
final replyId =
|
||||||
config.event.content["m.relates_to"]?["m.in_reply_to"]?["event_id"];
|
config.event.content["m.relates_to"]?["m.in_reply_to"]?["event_id"];
|
||||||
|
|
||||||
final reactionEvents = await ref
|
final reactionEvents = event.reactions.isEmpty
|
||||||
.watch(ClientController.provider.notifier)
|
? null
|
||||||
.getRelatedEvents(
|
: await ref
|
||||||
GetRelatedEventsRequest(
|
.watch(ClientController.provider.notifier)
|
||||||
roomId: config.room.metadata!.id,
|
.getRelatedEvents(
|
||||||
eventId: config.event.eventId,
|
GetRelatedEventsRequest(
|
||||||
relationType: "m.annotation",
|
roomId: config.room.metadata!.id,
|
||||||
),
|
eventId: config.event.eventId,
|
||||||
);
|
relationType: "m.annotation",
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
final reactions = reactionEvents
|
final reactions = reactionEvents
|
||||||
?.where((event) => event.redactedBy == null)
|
?.where((event) => event.redactedBy == null)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue