Update inbox when group avatars change
This commit is contained in:
parent
583fb98cce
commit
6e1a41e9cf
2 changed files with 7 additions and 2 deletions
|
@ -229,6 +229,7 @@
|
||||||
} else {
|
} else {
|
||||||
this.avatarUrl = null;
|
this.avatarUrl = null;
|
||||||
}
|
}
|
||||||
|
this.trigger('change');
|
||||||
},
|
},
|
||||||
|
|
||||||
getAvatarUrl: function() {
|
getAvatarUrl: function() {
|
||||||
|
|
|
@ -47,11 +47,15 @@
|
||||||
},
|
},
|
||||||
send: function() {
|
send: function() {
|
||||||
return this.avatarInput.getThumbnail().then(function(avatarFile) {
|
return this.avatarInput.getThumbnail().then(function(avatarFile) {
|
||||||
this.model.save({
|
this.model.set({
|
||||||
name: this.$('.name').val(),
|
name: this.$('.name').val(),
|
||||||
avatar: avatarFile,
|
|
||||||
members: _.union(this.model.get('members'), this.recipients_view.recipients.pluck('id'))
|
members: _.union(this.model.get('members'), this.recipients_view.recipients.pluck('id'))
|
||||||
});
|
});
|
||||||
|
if (avatarFile) {
|
||||||
|
this.model.set({avatar: avatarFile});
|
||||||
|
this.model.trigger('change:avatar');
|
||||||
|
}
|
||||||
|
this.model.save();
|
||||||
textsecure.messaging.updateGroup(
|
textsecure.messaging.updateGroup(
|
||||||
this.model.id,
|
this.model.id,
|
||||||
this.model.get('name'),
|
this.model.get('name'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue