Move ConversationController to its own file
Encapsulate the global conversation cache collection against accidental access, avoiding the data-clobbering bug fixed in previous commit. Also move some one-off program initialization code from panel controller to background.js // FREEBIE
This commit is contained in:
parent
8f28c3af68
commit
0017f196ef
4 changed files with 90 additions and 77 deletions
|
@ -18,6 +18,18 @@
|
|||
|
||||
textsecure.protocol_wrapper.startWorker();
|
||||
|
||||
ConversationController.updateInbox();
|
||||
|
||||
extension.onLaunched(function() {
|
||||
storage.onready(function() {
|
||||
if (textsecure.registration.isDone()) {
|
||||
openInbox();
|
||||
} else {
|
||||
extension.install();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
storage.fetch();
|
||||
storage.onready(function() {
|
||||
var messageReceiver;
|
||||
|
@ -27,6 +39,8 @@
|
|||
}
|
||||
extension.on('registration_done', init);
|
||||
|
||||
setUnreadCount(storage.get("unreadCount", 0));
|
||||
|
||||
window.getSocketStatus = function() {
|
||||
if (messageReceiver) {
|
||||
return messageReceiver.getStatus();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue