mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Fix re-rendering when resolving conflicts with media
* Don't open message detail views from message detail views * When message errors change, re-render the error state, but not the message markup and contents. * Fix renderErrors bug not removing the error class correctly. // FREEBIE
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
'click .drop-down': 'toggleMenu',
|
||||
'click .openInbox' : 'openInbox',
|
||||
'click' : 'onClick',
|
||||
'select .entry': 'messageDetail',
|
||||
'select .message-list .entry': 'messageDetail',
|
||||
'force-resize': 'forceUpdateMessageFieldSize',
|
||||
'click .choose-file': 'focusMessageField'
|
||||
},
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
template: $('#message-detail').html(),
|
||||
initialize: function(options) {
|
||||
this.view = new Whisper.MessageView({model: this.model});
|
||||
this.view.render();
|
||||
this.conversation = options.conversation;
|
||||
|
||||
this.listenTo(this.model, 'change', this.render);
|
||||
@@ -113,7 +114,7 @@
|
||||
errors : this.errors['undefined'],
|
||||
hasRetry : hasRetry
|
||||
}));
|
||||
this.view.render().$el.prependTo(this.$('.message-container'));
|
||||
this.view.$el.prependTo(this.$('.message-container'));
|
||||
|
||||
if (this.model.isOutgoing()) {
|
||||
this.conversation.contactCollection.reject(function(c) {
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
tagName: "li",
|
||||
template: $('#message').html(),
|
||||
initialize: function() {
|
||||
this.listenTo(this.model, 'change:body change:errors', this.render);
|
||||
this.listenTo(this.model, 'change:errors', this.renderErrors);
|
||||
this.listenTo(this.model, 'change:body', this.render);
|
||||
this.listenTo(this.model, 'change:delivered', this.renderDelivered);
|
||||
this.listenTo(this.model, 'change', this.renderSent);
|
||||
this.listenTo(this.model, 'change:flags change:group_update', this.renderControl);
|
||||
@@ -50,7 +51,7 @@
|
||||
this.$('.content').text(this.model.getDescription()).addClass('error-message');
|
||||
}
|
||||
} else {
|
||||
this.$el.removeClass('error');
|
||||
this.$('.bubble').removeClass('error');
|
||||
}
|
||||
},
|
||||
renderControl: function() {
|
||||
|
||||
Reference in New Issue
Block a user