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.
This commit is contained in:
lilia 2015-09-04 12:45:58 -07:00
parent 7d9490e503
commit 239b87a1fa

View file

@ -96,10 +96,7 @@
var view = new Whisper.GroupMemberList({ model: this.model }); var view = new Whisper.GroupMemberList({ model: this.model });
this.$el.hide(); this.$el.hide();
view.$el.insertAfter(this.el); view.$el.insertAfter(this.el);
this.listenTo(view, 'back', function() { this.listenBack(view);
view.remove();
this.$el.show();
}.bind(this));
}, },
openInbox: function() { openInbox: function() {
@ -126,10 +123,7 @@
}); });
this.$el.hide(); this.$el.hide();
view.render().$el.insertAfter(this.el); view.render().$el.insertAfter(this.el);
this.listenTo(view, 'back', function() { this.listenBack(view);
view.remove();
this.$el.show();
}.bind(this));
}.bind(this)); }.bind(this));
}.bind(this)); }.bind(this));
} }
@ -147,10 +141,11 @@
}, },
listenBack: function(view) { listenBack: function(view) {
this.listenTo(view, 'back', function() { this.listenToOnce(view, 'back', function(e) {
view.remove(); view.remove();
this.$el.show(); this.$el.show();
}); this.$el.trigger('force-resize');
}.bind(this));
}, },
closeMenu: function(e) { closeMenu: function(e) {