Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading only 1000 out of 2566 contacts #49

Open
vidz1979 opened this issue Jul 23, 2021 · 1 comment
Open

Loading only 1000 out of 2566 contacts #49

vidz1979 opened this issue Jul 23, 2021 · 1 comment

Comments

@vidz1979
Copy link

I am only getting 1000 contacts. I think there is a error in "load more" mechanism. Logs:

Restarted application in 703ms.
flutter: /##################################################
flutter: [BootstrapCommand]
flutter: DataDir is: C:\Users\jrvid\AppData\Roaming\flokk
flutter: ##################################################
flutter: [RefreshAuthTokensCommand] Refreshing with token: <<>>
flutter: Response: 200 / {
"access_token": "<<>>",
"expires_in": 3599,
"scope": "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/contacts",
"token_type": "Bearer",
"id_token": "<<>>"
}
flutter: Refresh token success. authKey = <<>>, refreshToken = <<>>
flutter: [RefreshContactsCommand]
flutter: [RefreshAuthTokensCommand] Refreshing with token: <<>>
flutter: REQUEST: https://people.googleapis.com/v1/people/me/connections?access_token=<<>>&personFields=addresses,ageRanges,biographies,birthdays,braggingRights,coverPhotos,emailAddresses,events,genders,imClients,interests,locales,memberships,metadata,names,nicknames,occupations,organizations,phoneNumbers,photos,relations,relationshipInterests,relationshipStatuses,residences,sipAddresses,skills,taglines,urls,userDefined&sortOrder=FIRST_NAME_ASCENDING&pageSize=2000&requestSyncToken=true /// RESPONSE: 200
flutter: token: <<>> 1000 out of 2566
flutter: [RefreshContactGroupsCommand]
flutter: [RefreshAuthTokensCommand] Refreshing with token: <<>>
flutter: REQUEST: https://people.googleapis.com/v1/contactGroups?access_token=<<>>&pageSize=1000 /// RESPONSE: 200
flutter: Groups loaded = 13
flutter: Contacts loaded = 1000
flutter: #########################
flutter: BootstrapCommand Complete
flutter: #########################
flutter: [RefreshContactsCommand]
flutter: [RefreshAuthTokensCommand] Refreshing with token: <<>>
flutter: REQUEST: https://people.googleapis.com/v1/people/me/connections?access_token=<<>>&personFields=addresses,ageRanges,biographies,birthdays,braggingRights,coverPhotos,emailAddresses,events,genders,imClients,interests,locales,memberships,metadata,names,nicknames,occupations,organizations,phoneNumbers,photos,relations,relationshipInterests,relationshipStatuses,residences,sipAddresses,skills,taglines,urls,userDefined&sortOrder=FIRST_NAME_ASCENDING&pageSize=2000&requestSyncToken=true /// RESPONSE: 200
flutter: token: <<>> 1000 out of 2566

@vidz1979
Copy link
Author

Although pageSize was fixed in 2000 in source code, seems to be Google is fixing limit to 1000, so I think this limit in Flokk should be reduced.

And I found out the problem in google_rest_contacts_service.dart:
return ServiceResult(GetContactsResult(list, nextPageToken: nextPageToken, syncToken: newSyncToken), response);

Changing nextPageToken to newNextPageToken solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant