Simplify panel state management and message passing

This commit is contained in:
Riley Shaw
2015-01-21 18:27:42 -10:00
committed by lilia
parent 9071d98395
commit 94ce4d4b91
12 changed files with 148 additions and 102 deletions

View File

@@ -19,6 +19,8 @@ var Whisper = Whisper || {};
(function () {
'use strict';
var bg = chrome.extension.getBackgroundPage();
// list of conversations, showing user/group and last message sent
Whisper.ConversationListItemView = Backbone.View.extend({
tagName: 'div',
@@ -45,7 +47,7 @@ var Whisper = Whisper || {};
this.view = new Whisper.ConversationView({ model: this.model });
}
openConversation(modelId);
bg.openConversation(modelId);
this.model.collection.trigger('selected', this.view);
},