gskinnerTeam / flokk

A fresh and modern Google Contacts manager that integrates with GitHub and Twitter.

Home Page:https://flokk.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loading only 1000 out of 2566 contacts

vidz1979 opened this issue · comments

commented

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

commented

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.