Browse Source

Merge pull request #725 from nextcloud/fix/notifications-serialization

fix(neon_notifications): Fix serialization
pull/728/head
Kate 1 year ago committed by GitHub
parent
commit
24136595d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      packages/neon/neon_notifications/lib/blocs/notifications.dart

13
packages/neon/neon_notifications/lib/blocs/notifications.dart

@ -50,15 +50,16 @@ class NotificationsBloc extends InteractiveBloc
@override @override
Future refresh() async { Future refresh() async {
await RequestManager.instance.wrapNextcloud< await RequestManager.instance
List<NotificationsNotification>, .wrapNextcloud<List<NotificationsNotification>, NotificationsEndpointListNotificationsResponseApplicationJson>(
NotificationsResponse<NotificationsEndpointListNotificationsResponseApplicationJson,
NotificationsEndpointEndpointListNotificationsHeaders>>(
_account.id, _account.id,
'notifications-notifications', 'notifications-notifications',
notifications, notifications,
() async => _account.client.notifications.endpoint.listNotifications(), () async {
(final response) => response.data.ocs.data.toList(), final response = await _account.client.notifications.endpoint.listNotifications();
return response.data;
},
(final response) => response.ocs.data.toList(),
); );
} }

Loading…
Cancel
Save