mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Simplify openConversation
Now that the InboxView is initialized in the background page context, we can manipulate it more directly, without going through a global function on the foreground window. // FREEBIE
This commit is contained in:
parent
06e53871b2
commit
cce1fe5c4b
2 changed files with 7 additions and 7 deletions
|
@ -308,12 +308,7 @@
|
|||
try {
|
||||
if (self.inboxView) { self.inboxView.remove(); }
|
||||
self.inboxView = new Whisper.InboxView({model: self, window: destWindow});
|
||||
destWindow.openConversation = function(conversation) {
|
||||
if (conversation) {
|
||||
self.inboxView.openConversation(null, conversation);
|
||||
}
|
||||
};
|
||||
destWindow.openConversation(getOpenConversation());
|
||||
self.openConversation(getOpenConversation());
|
||||
|
||||
return self.inboxView;
|
||||
|
||||
|
@ -321,6 +316,11 @@
|
|||
console.log(e);
|
||||
}
|
||||
});
|
||||
},
|
||||
openConversation: function(conversation) {
|
||||
if (this.inboxView && conversation) {
|
||||
this.inboxView.openConversation(null, conversation);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
var open;
|
||||
window.openConversation = function(conversation) {
|
||||
if (inboxOpened === true) {
|
||||
appWindow.contentWindow.openConversation(conversation);
|
||||
owsDesktopApp.openConversation(conversation);
|
||||
} else {
|
||||
open = conversation;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue