diff --git a/js/views/conversation_list_item_view.js b/js/views/conversation_list_item_view.js index cc0d281a..2d8ae744 100644 --- a/js/views/conversation_list_item_view.js +++ b/js/views/conversation_list_item_view.js @@ -20,7 +20,6 @@ var Whisper = Whisper || {}; 'use strict'; var bg = extension.windows.getBackground(); - // list of conversations, showing user/group and last message sent Whisper.ConversationListItemView = Backbone.View.extend({ tagName: 'div', @@ -39,17 +38,8 @@ var Whisper = Whisper || {}; }, open: function(e) { - var modelId = this.model.id; - this.$el.addClass('selected'); - - if (!this.view) { - this.view = new Whisper.ConversationView({ model: this.model }); - } - - bg.openConversation(modelId); - - this.model.collection.trigger('selected', this.view); + bg.openConversation(this.model.id); }, render: function() { diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 7cffb296..00f4c309 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -30,23 +30,13 @@ collection : this.conversations }); - this.conversations.fetchActive({reset: true}).then(function() { - if (this.conversations.length) { - this.conversations.at(0).trigger('open'); - } - }.bind(this)); + this.conversations.fetchActive({reset: true}); extension.on('message', function(message) { this.conversations.fetch({id: message.conversationId}).then(function() { this.conversations.get(message.conversationId).fetchMessages(); }.bind(this)); }.bind(this)); - - this.conversations.on('selected', function(view) { - $('.conversation').hide().trigger('close'); // detach any existing conversation views - this.setContent(view.$el.show()); - view.render(); - }, this); }, events: { 'click #new-message': 'new_message',