mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Don't load group contacts unnecessarily
There are some cases when we want to initialize a group object without loading its contacts, such as while processing delivery receipts. We really only need to load the contacts for a group/convo when we are rendering it, so let the front end handle those cases (which most of them do already).
This commit is contained in:
@@ -41,13 +41,12 @@
|
||||
this.on('change:avatar', this.updateAvatarUrl);
|
||||
this.on('destroy', this.revokeAvatarUrl);
|
||||
this.on('read', this.onReadMessage);
|
||||
this.fetchContacts().then(function() {
|
||||
this.contactCollection.each(function(contact) {
|
||||
textsecure.storage.protocol.on('keychange:' + contact.id, function() {
|
||||
this.addKeyChange(contact.id);
|
||||
}.bind(this));
|
||||
var members = this.get('members') || [];
|
||||
members.map(function(number) {
|
||||
textsecure.storage.protocol.on('keychange:' + m.id, function() {
|
||||
this.conversation.addKeyChange(m.id);
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
});
|
||||
},
|
||||
|
||||
addKeyChange: function(id) {
|
||||
@@ -324,7 +323,7 @@
|
||||
} else {
|
||||
var promises = [];
|
||||
var members = this.get('members') || [];
|
||||
this.contactCollection.reset(
|
||||
this.contactCollection.add(
|
||||
members.map(function(number) {
|
||||
var c = ConversationController.create({
|
||||
id : number,
|
||||
|
||||
Reference in New Issue
Block a user