Let background page instantiate AccountManagers
Remove the need to expose the server url config as a global. // FREEBIE
This commit is contained in:
parent
edd76ec65a
commit
e626355e0c
3 changed files with 8 additions and 5 deletions
|
@ -62,6 +62,12 @@
|
|||
return -1;
|
||||
}
|
||||
};
|
||||
window.getAccountManager = function() {
|
||||
var USERNAME = storage.get('number_id');
|
||||
var PASSWORD = storage.get('password');
|
||||
return new textsecure.AccountManager(SERVER_URL, USERNAME, PASSWORD);
|
||||
};
|
||||
|
||||
storage.fetch();
|
||||
storage.onready(function() {
|
||||
setUnreadCount(storage.get("unreadCount", 0));
|
||||
|
@ -74,8 +80,6 @@
|
|||
init(true);
|
||||
});
|
||||
|
||||
window.TEXT_SECURE_SERVER_URL = 'https://textsecure-service-staging.whispersystems.org';
|
||||
|
||||
if (open) {
|
||||
openInbox();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue