Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

getNextPage() is always null for synchronous call. #117

Closed
isabsent opened this issue Jan 13, 2017 · 2 comments
Closed

getNextPage() is always null for synchronous call. #117

isabsent opened this issue Jan 13, 2017 · 2 comments

Comments

@isabsent
Copy link
Contributor

isabsent commented Jan 13, 2017

I am making synchronous call (using get() without callback in the argument in a non-UI thread):

Item loadedItem = oneDriveClient
    .getDrive()
    .getItems(item.id)
    .buildRequest()
    .expand(getExpansionOptions(service))
    .get();

List<Item> currentPageList = loadedItem.children.getCurrentPage();
int currentPageSize = currentPageList.size();
boolean hasNextPage = loadedItem.children.getNextPage() != null;

to the folder containing more than 200 files. The result is:

currentPageSize = 200;
hasNextPage = false

Should hasNextPage be true for synchronous call if folder contains more than 200 files?
P.S.:

private String getExpansionOptions(final IOneDriveClient oneDriveClient) {
    final String expansionOption;
    switch (oneDriveClient.getAuthenticator().getAccountInfo().getAccountType()) {
        case MicrosoftAccount:
            expansionOption = EXPAND_OPTIONS_FOR_CHILDREN_AND_THUMBNAILS;
            break;

        default:
            expansionOption = EXPAND_OPTIONS_FOR_CHILDREN_AND_THUMBNAILS_LIMITED;
            break;
    }
    return expansionOption;
}
@isabsent
Copy link
Contributor Author

Hi, guys! Did you check this issue!? It make impossible to list files in a huge folder!

@baywet
Copy link
Member

baywet commented Oct 2, 2024

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #172 for more information

@baywet baywet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants