Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package com.nextcloud.lib.resources.users

import com.owncloud.android.AbstractIT
import com.owncloud.android.lib.resources.activities.GetActivitiesRemoteOperation
import com.owncloud.android.lib.resources.activities.model.Activity
import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation
import org.junit.Assert.assertTrue
import org.junit.Test
Expand All @@ -23,8 +22,8 @@ class GetActivitiesRemoteOperationIT : AbstractIT() {
val result = nextcloudClient.execute(GetActivitiesRemoteOperation())
assertTrue(result.isSuccess)

val activities = result.data[0] as ArrayList<Activity>
val lastGiven = result.data[1] as Integer
val activities = result.data[0] as ArrayList<*>
val lastGiven = result.data[1] as Long

assertTrue(activities.isNotEmpty())
assertTrue(lastGiven > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class GetActivitiesRemoteOperation extends RemoteOperation {

private static final String NODE_DATA = "data";

private int lastGiven = -1;
private long lastGiven = -1;

private long fileId = -1;

Expand All @@ -65,7 +65,7 @@ public GetActivitiesRemoteOperation(long fileId) {
this.fileId = fileId;
}

public GetActivitiesRemoteOperation(long fileId, int lastGiven) {
public GetActivitiesRemoteOperation(long fileId, long lastGiven) {
this.fileId = fileId;
this.lastGiven = lastGiven;
}
Expand Down Expand Up @@ -114,7 +114,7 @@ public RemoteOperationResult run(NextcloudClient client) {
if (isSuccess(status)) {
String nextPageHeader = get.getResponseHeader("X-Activity-Last-Given");
if (nextPageHeader != null) {
lastGiven = Integer.parseInt(nextPageHeader);
lastGiven = Long.parseLong(nextPageHeader);
} else {
lastGiven = -1;
}
Expand Down Expand Up @@ -185,7 +185,7 @@ protected RemoteOperationResult run(OwnCloudClient client) {

Header nextPageHeader = get.getResponseHeader("X-Activity-Last-Given");
if (nextPageHeader != null) {
lastGiven = Integer.parseInt(nextPageHeader.getValue());
lastGiven = Long.parseLong(nextPageHeader.getValue());
} else {
lastGiven = -1;
}
Expand Down
Loading