Revert "Don't load group contacts unnecessarily"
This reverts commit 6699571910
.
Not quite ready for primetime.
This commit is contained in:
parent
6699571910
commit
0854b19371
2 changed files with 12 additions and 13 deletions
|
@ -41,12 +41,13 @@
|
||||||
this.on('change:avatar', this.updateAvatarUrl);
|
this.on('change:avatar', this.updateAvatarUrl);
|
||||||
this.on('destroy', this.revokeAvatarUrl);
|
this.on('destroy', this.revokeAvatarUrl);
|
||||||
this.on('read', this.onReadMessage);
|
this.on('read', this.onReadMessage);
|
||||||
var members = this.get('members') || [];
|
this.fetchContacts().then(function() {
|
||||||
members.map(function(number) {
|
this.contactCollection.each(function(contact) {
|
||||||
textsecure.storage.protocol.on('keychange:' + m.id, function() {
|
textsecure.storage.protocol.on('keychange:' + contact.id, function() {
|
||||||
this.conversation.addKeyChange(m.id);
|
this.addKeyChange(contact.id);
|
||||||
|
}.bind(this));
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
});
|
}.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
addKeyChange: function(id) {
|
addKeyChange: function(id) {
|
||||||
|
@ -323,7 +324,7 @@
|
||||||
} else {
|
} else {
|
||||||
var promises = [];
|
var promises = [];
|
||||||
var members = this.get('members') || [];
|
var members = this.get('members') || [];
|
||||||
this.contactCollection.add(
|
this.contactCollection.reset(
|
||||||
members.map(function(number) {
|
members.map(function(number) {
|
||||||
var c = ConversationController.create({
|
var c = ConversationController.create({
|
||||||
id : number,
|
id : number,
|
||||||
|
|
|
@ -269,14 +269,12 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
messageDetail: function(e, data) {
|
messageDetail: function(e, data) {
|
||||||
return this.model.fetchContacts().then(function() {
|
var view = new Whisper.MessageDetailView({
|
||||||
var view = new Whisper.MessageDetailView({
|
model: data.message,
|
||||||
model: data.message,
|
conversation: this.model
|
||||||
conversation: this.model
|
|
||||||
});
|
|
||||||
this.listenBack(view);
|
|
||||||
view.render();
|
|
||||||
});
|
});
|
||||||
|
this.listenBack(view);
|
||||||
|
view.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
listenBack: function(view) {
|
listenBack: function(view) {
|
||||||
|
|
Loading…
Reference in a new issue