|
|
@ -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(), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|