Move openConversation handler to InboxView
Removes the background page ref to inbox which should fix view tests. Prep for handling new contact creation.
This commit is contained in:
parent
1eab26635b
commit
d26dc8c7e6
3 changed files with 8 additions and 4 deletions
|
@ -17,6 +17,7 @@
|
|||
'use strict';
|
||||
|
||||
window.Whisper = window.Whisper || {};
|
||||
var bg = extension.windows.getBackground();
|
||||
|
||||
Whisper.InboxView = Backbone.View.extend({
|
||||
initialize: function () {
|
||||
|
@ -48,7 +49,11 @@
|
|||
events: {
|
||||
'click .back': 'hideCompose',
|
||||
'click .fab': 'showCompose',
|
||||
'keyup input.new-message': 'compose'
|
||||
'keyup input.new-message': 'compose',
|
||||
'open .contact': 'openConversation'
|
||||
},
|
||||
openConversation: function(e, data) {
|
||||
bg.openConversation(data.modelId);
|
||||
},
|
||||
showCompose: function() {
|
||||
this.$fab.hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue