b4j4 / indicator-kdeconnect

AppIndicator for KDE Connect
GNU Lesser General Public License v2.1
372 stars 38 forks source link

Only seeing ~25% of contacts in my Google Contacts #64

Closed mfarley281 closed 7 years ago

mfarley281 commented 7 years ago

I haven't been to figure out the criteria, but only about 25% of my Google Contacts are showing up in the autocomplete when typing names to send an SMS to.

I'm on Ubuntu MATE 16.04 LTS, everything's up to date.

b4j4 commented 7 years ago

Umh, i need more people confirming this, because at the moment you are the only one saying that. But for now ensure all of your contacts is synchronized with Google Account and press the button on the SMS app to ensure your contacts is synchronized correctly.

mfarley281 commented 7 years ago

I did some debugging and found that whenever I delete contacts.json it always fetches the exact same set of 100 contacts from Google. I have 300+ contacts, but it only fetches the first 100.

I monitored the length of "raw_contacts" at line 153 in sms.py and found that it's always capped at 100. So I think there's something wrong with the algorithm in the way it's meant to page through several data sets from the Google People API, but only ever gets the first page (first 100 contacts).

b4j4 commented 7 years ago

@OzymandiasTheGreat, Can you take a look at this?

OzymandiasTheGreat commented 7 years ago

Confirmed! I screwed up the api call, it maxes out at 100 contacts, working on a fix right now.

OzymandiasTheGreat commented 7 years ago

@Bajoja Okay, this is tricky. Fixing the api call makes me hit the api quota if there's more than 200 contacts, so I can only get 50 contacts every 20 seconds. I'm rewriting the sync right now, but since it's no longer instant I'm thinking I should put in notifications to tell the user to wait a few minutes and then another when it's done. Are you ok with Sms.py showing desktop notifications?