Add SyncRequest class
Similar in function to an xhr request, a textsecure.SyncRequest object is initialized from a message sender and receiver pair and initiates a request for sync from the master device. It later fires a success event when both contacts and groups are done syncing, or a timeout event after one minute. // FREEBIE
This commit is contained in:
parent
d8381cfc47
commit
925c1bdb33
5 changed files with 246 additions and 11 deletions
|
@ -38,10 +38,8 @@
|
|||
var launch = function() {
|
||||
bg.openInbox();
|
||||
bg.removeEventListener('textsecure:contactsync', launch);
|
||||
clearTimeout(timeout);
|
||||
window.close();
|
||||
};
|
||||
var timeout = setTimeout(launch, 60000);
|
||||
bg.addEventListener('textsecure:contactsync', launch);
|
||||
view.showSync();
|
||||
}).catch(function(e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue