From 239b87a1fad229eb111fd8a61ae6ee808dc9605f Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 4 Sep 2015 12:45:58 -0700 Subject: [PATCH] Fix conversation resize bug Fix behavior where resizing a message detail screen would result in a mis-sized conversation view when exiting the message detail. --- js/views/conversation_view.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index c533b5a0..bdf03c80 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -96,10 +96,7 @@ var view = new Whisper.GroupMemberList({ model: this.model }); this.$el.hide(); view.$el.insertAfter(this.el); - this.listenTo(view, 'back', function() { - view.remove(); - this.$el.show(); - }.bind(this)); + this.listenBack(view); }, openInbox: function() { @@ -126,10 +123,7 @@ }); this.$el.hide(); view.render().$el.insertAfter(this.el); - this.listenTo(view, 'back', function() { - view.remove(); - this.$el.show(); - }.bind(this)); + this.listenBack(view); }.bind(this)); }.bind(this)); } @@ -147,10 +141,11 @@ }, listenBack: function(view) { - this.listenTo(view, 'back', function() { + this.listenToOnce(view, 'back', function(e) { view.remove(); this.$el.show(); - }); + this.$el.trigger('force-resize'); + }.bind(this)); }, closeMenu: function(e) {