Skip to content

Commit

Permalink
Force full contact/group import on next launch if not first run (#1476)
Browse files Browse the repository at this point in the history
* Force full contact/group import on next launch (if not first run)

FREEBIE

* Don't update contact sync key in storage on every reconnect

FREEBIE
  • Loading branch information
scottnonnenberg committed Sep 14, 2017
1 parent 2166e09 commit ff6dc78
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions js/background.js
Expand Up @@ -143,6 +143,18 @@
SERVER_URL, SERVER_PORTS, USERNAME, PASSWORD
);

// Because v0.43.2 introduced a bug that lost contact details, v0.43.4 introduces
// a one-time contact sync to restore all lost contact/group information. We
// disable this checking if a user is first registering.
var key = 'chrome-contact-sync-v0.43.4';
if (!storage.get(key)) {
storage.put(key, true);

if (!firstRun && textsecure.storage.user.getDeviceId() != '1') {
window.getSyncRequest();
}
}

if (firstRun === true && textsecure.storage.user.getDeviceId() != '1') {
if (!storage.get('theme-setting') && textsecure.storage.get('userAgent') === 'OWI') {
storage.put('theme-setting', 'ios');
Expand Down

0 comments on commit ff6dc78

Please sign in to comment.