diff --git a/app/src/gplay/java/com/owncloud/android/utils/PushUtils.java b/app/src/gplay/java/com/owncloud/android/utils/PushUtils.java index 57ae513486..a6ce47396b 100644 --- a/app/src/gplay/java/com/owncloud/android/utils/PushUtils.java +++ b/app/src/gplay/java/com/owncloud/android/utils/PushUtils.java @@ -220,14 +220,14 @@ public final class PushUtils { OwnCloudClient client = OwnCloudClientManagerFactory.getDefaultSingleton(). getClientFor(ocAccount, context); - RemoteOperationResult remoteOperationResult = + RemoteOperationResult remoteOperationResult = new RegisterAccountDeviceForNotificationsOperation(pushTokenHash, publicKey, context.getResources().getString(R.string.push_server_url)) .execute(client); if (remoteOperationResult.isSuccess()) { - PushResponse pushResponse = remoteOperationResult.getPushResponseData(); + PushResponse pushResponse = remoteOperationResult.getResultData(); RemoteOperationResult resultProxy = new RegisterAccountDeviceForProxyOperation( context.getResources().getString(R.string.push_server_url), diff --git a/app/src/main/java/com/nextcloud/client/jobs/NotificationWork.kt b/app/src/main/java/com/nextcloud/client/jobs/NotificationWork.kt index 311567c11c..0c4d2466c6 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/NotificationWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/NotificationWork.kt @@ -256,7 +256,7 @@ class NotificationWork constructor( val result = GetNotificationRemoteOperation(decryptedPushMessage.nid) .execute(client) if (result.isSuccess) { - val notification = result.notificationData[0] + val notification = result.resultData sendNotification(notification, account) } } catch (e: Exception) { diff --git a/app/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java index 4308de3b8b..21bc674acc 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java @@ -40,7 +40,6 @@ import com.owncloud.android.databinding.NotificationsLayoutBinding; import com.owncloud.android.datamodel.ArbitraryDataProvider; import com.owncloud.android.datamodel.ArbitraryDataProviderImpl; import com.owncloud.android.lib.common.OwnCloudClient; -import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.resources.notifications.GetNotificationsRemoteOperation; @@ -226,13 +225,11 @@ public class NotificationsActivity extends DrawerActivity implements Notificatio Thread t = new Thread(() -> { initializeAdapter(); - RemoteOperation getRemoteNotificationOperation = new GetNotificationsRemoteOperation(); - final RemoteOperationResult result = getRemoteNotificationOperation.execute(client); + GetNotificationsRemoteOperation getRemoteNotificationOperation = new GetNotificationsRemoteOperation(); + final RemoteOperationResult> result = getRemoteNotificationOperation.execute(client); - if (result.isSuccess() && result.getNotificationData() != null) { - final List notifications = result.getNotificationData(); - - runOnUiThread(() -> populateList(notifications)); + if (result.isSuccess() && result.getResultData() != null) { + runOnUiThread(() -> populateList(result.getResultData())); } else { Log_OC.d(TAG, result.getLogMessage()); // show error