diff --git a/readropslibrary/src/main/java/com/readrops/readropslibrary/services/API.java b/readropslibrary/src/main/java/com/readrops/readropslibrary/services/API.java index 89694816..952662d2 100644 --- a/readropslibrary/src/main/java/com/readrops/readropslibrary/services/API.java +++ b/readropslibrary/src/main/java/com/readrops/readropslibrary/services/API.java @@ -15,6 +15,8 @@ import retrofit2.converter.gson.GsonConverterFactory; */ public abstract class API { + protected static final int MAX_ITEMS = 5000; + protected T api; public API(Credentials credentials, @NonNull Class clazz, @NonNull String endPoint) { diff --git a/readropslibrary/src/main/java/com/readrops/readropslibrary/services/freshrss/FreshRSSAPI.java b/readropslibrary/src/main/java/com/readrops/readropslibrary/services/freshrss/FreshRSSAPI.java index 8a680676..e2215b66 100644 --- a/readropslibrary/src/main/java/com/readrops/readropslibrary/services/freshrss/FreshRSSAPI.java +++ b/readropslibrary/src/main/java/com/readrops/readropslibrary/services/freshrss/FreshRSSAPI.java @@ -95,9 +95,9 @@ public class FreshRSSAPI extends API { switch (syncType) { case INITIAL_SYNC: - return getItems(GOOGLE_READ, 10000, null); + return getItems(GOOGLE_READ, MAX_ITEMS, null); case CLASSIC_SYNC: - return getItems(GOOGLE_READ, 10000, syncData.getLastModified()); + return getItems(GOOGLE_READ, MAX_ITEMS, syncData.getLastModified()); } return Single.error(new Exception("Unknown sync type")); diff --git a/readropslibrary/src/main/java/com/readrops/readropslibrary/services/nextcloudnews/NextNewsAPI.java b/readropslibrary/src/main/java/com/readrops/readropslibrary/services/nextcloudnews/NextNewsAPI.java index e5ce6e47..a7a27449 100644 --- a/readropslibrary/src/main/java/com/readrops/readropslibrary/services/nextcloudnews/NextNewsAPI.java +++ b/readropslibrary/src/main/java/com/readrops/readropslibrary/services/nextcloudnews/NextNewsAPI.java @@ -78,7 +78,7 @@ public class NextNewsAPI extends API { private void initialSync(NextNewsSyncResult syncResult) throws IOException { getFeedsAndFolders(syncResult); - Response itemsResponse = api.getItems(3, false, -1).execute(); + Response itemsResponse = api.getItems(3, false, MAX_ITEMS).execute(); NextNewsItems itemList = itemsResponse.body(); if (!itemsResponse.isSuccessful())