working jumps from notif page
Doesn't work from notif page pushed from notif controller
This commit is contained in:
parent
9f070fcdba
commit
c90a1c41b0
6 changed files with 136 additions and 57 deletions
|
|
@ -32,7 +32,7 @@ final class const RoomChat({
|
|||
final relatedEvent = useState<Event?>(null);
|
||||
final relationType = useState(RelationType.reply);
|
||||
final contextualEvent = useState<String?>(initialHighlightedEvent);
|
||||
final highlightedEvent = useState<String?>(initialHighlightedEvent);
|
||||
final highlightedEvent = useState<String?>(null);
|
||||
|
||||
final composerSize = useState<double>(64);
|
||||
|
||||
|
|
@ -106,6 +106,24 @@ final class const RoomChat({
|
|||
});
|
||||
}
|
||||
|
||||
useEffect(() {
|
||||
if (initialHighlightedEvent == null) return null;
|
||||
|
||||
void check() {
|
||||
if (!context.mounted) return;
|
||||
|
||||
if (scroll.scrollController.hasClients) {
|
||||
jumpToId(initialHighlightedEvent!);
|
||||
} else {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => check());
|
||||
}
|
||||
}
|
||||
|
||||
check();
|
||||
|
||||
return null;
|
||||
}, [initialHighlightedEvent]);
|
||||
|
||||
IList<PopupMenuEntry> getEventOptions(Event event) =>
|
||||
event.buildEventOptions(
|
||||
context: context,
|
||||
|
|
|
|||
Loading…
Reference in a new issue