Load all inbox convos before rendering
This is a better alternative to the fix in 0434c4b
, which causes
problems when creating a new conversation from entering a phone number.
// FREEBIE
This commit is contained in:
parent
57ac7c4fd7
commit
7fb4d3d8aa
4 changed files with 18 additions and 20 deletions
31
js/index.js
31
js/index.js
|
@ -20,21 +20,22 @@
|
|||
function render() {
|
||||
extension.windows.getBackground(function(bg) {
|
||||
extension.windows.getCurrent(function(appWindow) {
|
||||
try {
|
||||
if (view) { view.remove(); }
|
||||
var $body = bg.$('body',document).empty();
|
||||
view = new bg.Whisper.InboxView({appWindow: appWindow});
|
||||
view.$el.prependTo($body);
|
||||
window.openConversation = function(conversation) {
|
||||
if (conversation) {
|
||||
view.openConversation(null, conversation);
|
||||
}
|
||||
};
|
||||
openConversation(bg.getOpenConversation());
|
||||
} catch (e) {
|
||||
logError(e);
|
||||
}
|
||||
|
||||
bg.ConversationController.updateInbox().then(function() {
|
||||
try {
|
||||
if (view) { view.remove(); }
|
||||
var $body = bg.$('body',document).empty();
|
||||
view = new bg.Whisper.InboxView({appWindow: appWindow});
|
||||
view.$el.prependTo($body);
|
||||
window.openConversation = function(conversation) {
|
||||
if (conversation) {
|
||||
view.openConversation(null, conversation);
|
||||
}
|
||||
};
|
||||
openConversation(bg.getOpenConversation());
|
||||
} catch (e) {
|
||||
logError(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue