use of com.owncloud.android.lib.resources.notifications.GetNotificationsRemoteOperation in project android by nextcloud.
the class NotificationsActivity method fetchAndSetData.
private void fetchAndSetData() {
Thread t = new Thread(() -> {
initializeAdapter();
RemoteOperation getRemoteNotificationOperation = new GetNotificationsRemoteOperation();
final RemoteOperationResult result = getRemoteNotificationOperation.execute(client);
if (result.isSuccess() && result.getNotificationData() != null) {
final List<Notification> notifications = result.getNotificationData();
runOnUiThread(() -> populateList(notifications));
} else {
Log_OC.d(TAG, result.getLogMessage());
// show error
runOnUiThread(() -> setEmptyContent(getString(R.string.notifications_no_results_headline), result.getLogMessage()));
}
hideRefreshLayoutLoader();
});
t.start();
}
Aggregations