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

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

Closed as not planned
Closed as not planned
@isabsent

Description

@isabsent

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions