Add account switcher

Fixes #146
This commit is contained in:
Henry Hiles 2026-11-02 17:00:54 -05:00
commit 641341ed90
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -1,9 +1,14 @@
import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:nexus/controllers/notification_request.dart";
import "package:nexus/models/sidebar_page.dart";
class SidebarPageController extends Notifier<SidebarPage> {
// Show the notification that switched accounts, if one did
@override
SidebarPage build() => .rooms;
SidebarPage build() =>
ref.read(NotificationRequestController.provider) == null
? .rooms
: .notifications;
void set(SidebarPage page) => state = page;