From 3d1df790a53cb457a0861b2087b09e7cde12c4d9 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 3 Jun 2015 17:23:55 -0700 Subject: [PATCH] Update the window title when a group title or contact name changes --- js/views/conversation_view.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 9d7a3d18c..d9d658ec2 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -31,6 +31,7 @@ }, initialize: function(options) { this.listenTo(this.model, 'destroy', this.stopListening); + this.listenTo(this.model, 'change:name', this.updateTitle); this.render(); @@ -181,6 +182,10 @@ return m; } }); + }, + + updateTitle: function() { + this.$('.conversation-title').text(this.model.getTitle()); } }); })();