From f6376c0fa2f3b6d01e5794a1e52b5717a3d6e8ca Mon Sep 17 00:00:00 2001 From: lilia Date: Sat, 17 Jan 2015 20:07:50 -1000 Subject: [PATCH] Rename event 'open' seems a better name for an event that triggers the open function. --- js/views/conversation_list_item_view.js | 2 +- js/views/inbox_view.js | 2 +- js/views/new_conversation_view.js | 2 +- js/views/new_group_view.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/views/conversation_list_item_view.js b/js/views/conversation_list_item_view.js index d60e1409..c3470766 100644 --- a/js/views/conversation_list_item_view.js +++ b/js/views/conversation_list_item_view.js @@ -16,7 +16,7 @@ var Whisper = Whisper || {}; this.listenTo(this.model, 'change', this.render); // auto update this.listenTo(this.model, 'destroy', this.remove); // auto update - this.listenTo(this.model, 'render', this.open); + this.listenTo(this.model, 'open', this.open); }, open: function(e) { diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 2644daf0..85455b26 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -34,7 +34,7 @@ this.conversations.fetchActive({reset: true}).then(function() { if (this.conversations.length) { - this.conversations.at(0).trigger('render'); + this.conversations.at(0).trigger('open'); } }.bind(this)); diff --git a/js/views/new_conversation_view.js b/js/views/new_conversation_view.js index cdb90e33..d8798908 100644 --- a/js/views/new_conversation_view.js +++ b/js/views/new_conversation_view.js @@ -48,7 +48,7 @@ var Whisper = Whisper || {}; message_input.val(""); } this.remove(); - convo.trigger('render'); + convo.trigger('open'); } } }); diff --git a/js/views/new_group_view.js b/js/views/new_group_view.js index a9ed1bdd..1d00a5d2 100644 --- a/js/views/new_group_view.js +++ b/js/views/new_group_view.js @@ -48,7 +48,7 @@ var Whisper = Whisper || {}; view.fileInput.getFiles().then(function(attachments) { convo.sendMessage(view.$el.find('input.send-message').val()); }); - convo.trigger('render'); + convo.trigger('open'); }); }); }