add JumpToEventController to allow jumping to events from the NotificationsPage when it has been pushed from the NotificationController

This commit is contained in:
Henry Hiles 2026-09-26 19:37:47 -04:00
commit 1c1f585362
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
5 changed files with 70 additions and 65 deletions

View file

@ -16,11 +16,8 @@ import "package:nexus/widgets/room_menu.dart";
// Needed for navigation_rail_m3e (#65).
import "package:flutter/material.dart" as old_mat;
class const Sidebar({
required final bool isDesktop,
required final void Function(String eventId) jumpToEvent,
super.key,
}) extends HookConsumerWidget {
class const Sidebar({required final bool isDesktop, super.key})
extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final selectedSpaceProvider = KeyController.provider(
@ -197,8 +194,7 @@ class const Sidebar({
tooltip: "Open notifications",
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (_) =>
NotificationsPage(jumpToEvent: jumpToEvent),
builder: (_) => NotificationsPage(),
),
),
icon: Icon(Icons.notifications),