diff --git a/packages/neon/neon_notes/lib/src/blocs/notes.dart b/packages/neon/neon_notes/lib/src/blocs/notes.dart index 67541518177..a7ba6921513 100644 --- a/packages/neon/neon_notes/lib/src/blocs/notes.dart +++ b/packages/neon/neon_notes/lib/src/blocs/notes.dart @@ -6,7 +6,7 @@ import 'package:neon_framework/blocs.dart'; import 'package:neon_framework/models.dart'; import 'package:neon_framework/utils.dart'; import 'package:neon_notes/src/options.dart'; -import 'package:nextcloud/notes.dart' as notes; +import 'package:nextcloud/notes.dart' as $notes; import 'package:rxdart/rxdart.dart'; sealed class NotesBloc implements InteractiveBloc { @@ -36,7 +36,7 @@ sealed class NotesBloc implements InteractiveBloc { void deleteNote(int id); - BehaviorSubject>> get notesList; + BehaviorSubject>> get notes; NotesOptions get options; } @@ -55,19 +55,19 @@ class _NotesBloc extends InteractiveBloc implements NotesBloc { @override void dispose() { - unawaited(notesList.close()); + unawaited(notes.close()); super.dispose(); } @override - final notesList = BehaviorSubject(); + final notes = BehaviorSubject(); @override Future refresh() async { await RequestManager.instance.wrapNextcloud( account: account, cacheKey: 'notes-notes', - subject: notesList, + subject: notes, rawResponse: account.client.notes.getNotesRaw(), unwrap: (response) => response.body, ); diff --git a/packages/neon/neon_notes/lib/src/widgets/categories_view.dart b/packages/neon/neon_notes/lib/src/widgets/categories_view.dart index 437711a7d50..636e40f7ffb 100644 --- a/packages/neon/neon_notes/lib/src/widgets/categories_view.dart +++ b/packages/neon/neon_notes/lib/src/widgets/categories_view.dart @@ -20,7 +20,7 @@ class NotesCategoriesView extends StatelessWidget { @override Widget build(BuildContext context) => ResultBuilder.behaviorSubject( - subject: bloc.notesList, + subject: bloc.notes, builder: (context, notes) => SortBoxBuilder( sortBox: categoriesSortBox, sortProperty: bloc.options.categoriesSortPropertyOption, diff --git a/packages/neon/neon_notes/lib/src/widgets/dialog.dart b/packages/neon/neon_notes/lib/src/widgets/dialog.dart index 335157a0756..ea6e4d1e5dc 100644 --- a/packages/neon/neon_notes/lib/src/widgets/dialog.dart +++ b/packages/neon/neon_notes/lib/src/widgets/dialog.dart @@ -60,7 +60,7 @@ class _NotesCreateNoteDialogState extends State { ); final folderSelector = ResultBuilder.behaviorSubject( - subject: widget.bloc.notesList, + subject: widget.bloc.notes, builder: (context, notes) { if (notes.hasError) { return Center( @@ -148,7 +148,7 @@ class _NotesSelectCategoryDialogState extends State { @override Widget build(BuildContext context) { final folderSelector = ResultBuilder.behaviorSubject( - subject: widget.bloc.notesList, + subject: widget.bloc.notes, builder: (context, notes) { if (notes.hasError) { return Center( diff --git a/packages/neon/neon_notes/lib/src/widgets/notes_view.dart b/packages/neon/neon_notes/lib/src/widgets/notes_view.dart index 042f838e82b..305a9ac5b03 100644 --- a/packages/neon/neon_notes/lib/src/widgets/notes_view.dart +++ b/packages/neon/neon_notes/lib/src/widgets/notes_view.dart @@ -26,7 +26,7 @@ class NotesView extends StatelessWidget { @override Widget build(BuildContext context) => ResultBuilder.behaviorSubject( - subject: bloc.notesList, + subject: bloc.notes, builder: (context, notesList) => SortBoxBuilder( sortBox: notesSortBox, presort: const { diff --git a/packages/neon/neon_notifications/lib/src/blocs/notifications.dart b/packages/neon/neon_notifications/lib/src/blocs/notifications.dart index b98d5d6ac26..283f5622f43 100644 --- a/packages/neon/neon_notifications/lib/src/blocs/notifications.dart +++ b/packages/neon/neon_notifications/lib/src/blocs/notifications.dart @@ -6,7 +6,7 @@ import 'package:neon_framework/blocs.dart'; import 'package:neon_framework/models.dart'; import 'package:neon_framework/utils.dart'; import 'package:neon_notifications/src/options.dart'; -import 'package:nextcloud/notifications.dart' as notifications; +import 'package:nextcloud/notifications.dart' as $notifications; import 'package:rxdart/rxdart.dart'; sealed class NotificationsBloc implements NotificationsBlocInterface, InteractiveBloc { @@ -22,7 +22,7 @@ sealed class NotificationsBloc implements NotificationsBlocInterface, Interactiv void deleteAllNotifications(); - BehaviorSubject>> get notificationsList; + BehaviorSubject>> get notifications; BehaviorSubject get unreadCounter; } @@ -32,7 +32,7 @@ class _NotificationsBloc extends InteractiveBloc implements NotificationsBlocInt this.options, this.account, ) { - notificationsList.listen((result) { + notifications.listen((result) { if (result.hasData) { unreadCounter.add(result.requireData.length); } @@ -49,13 +49,13 @@ class _NotificationsBloc extends InteractiveBloc implements NotificationsBlocInt @override void dispose() { timer.cancel(); - unawaited(notificationsList.close()); + unawaited(notifications.close()); unawaited(unreadCounter.close()); super.dispose(); } @override - final notificationsList = BehaviorSubject(); + final notifications = BehaviorSubject(); @override final unreadCounter = BehaviorSubject(); @@ -65,7 +65,7 @@ class _NotificationsBloc extends InteractiveBloc implements NotificationsBlocInt await RequestManager.instance.wrapNextcloud( account: account, cacheKey: 'notifications-notifications', - subject: notificationsList, + subject: notifications, rawResponse: account.client.notifications.endpoint.listNotificationsRaw(), unwrap: (response) => response.body.ocs.data, ); diff --git a/packages/neon/neon_notifications/lib/src/pages/main.dart b/packages/neon/neon_notifications/lib/src/pages/main.dart index c5200a0d39b..e9ee2375ec0 100644 --- a/packages/neon/neon_notifications/lib/src/pages/main.dart +++ b/packages/neon/neon_notifications/lib/src/pages/main.dart @@ -36,7 +36,7 @@ class _NotificationsMainPageState extends State { @override Widget build(BuildContext context) => ResultBuilder.behaviorSubject( - subject: bloc.notificationsList, + subject: bloc.notifications, builder: (context, notifications) => Scaffold( resizeToAvoidBottomInset: false, floatingActionButton: StreamBuilder(