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
Future refresh() async {
await RequestManager.instance.wrapNextcloud<
List<NotificationsNotification>,
NotificationsResponse<NotificationsEndpointListNotificationsResponseApplicationJson,
NotificationsEndpointEndpointListNotificationsHeaders>>(
await RequestManager.instance
.wrapNextcloud<List<NotificationsNotification>, NotificationsEndpointListNotificationsResponseApplicationJson>(
_account.id,
'notifications-notifications',
notifications,
() async => _account.client.notifications.endpoint.listNotifications(),
(final response) => response.data.ocs.data.toList(),
() async {
final response = await _account.client.notifications.endpoint.listNotifications();
return response.data;
},
(final response) => response.ocs.data.toList(),
);
}

Loading…
Cancel
Save