parent
3a8d977f11
commit
641341ed90
1 changed files with 667 additions and 144 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue