Skip to content

Commit

Permalink
Revert "Don't load group contacts unnecessarily"
Browse files Browse the repository at this point in the history
This reverts commit 6699571.

Not quite ready for primetime.
  • Loading branch information
liliakai committed Nov 16, 2016
1 parent 6699571 commit 0854b19
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
13 changes: 7 additions & 6 deletions js/models/conversations.js
Expand Up @@ -41,12 +41,13 @@
this.on('change:avatar', this.updateAvatarUrl);
this.on('destroy', this.revokeAvatarUrl);
this.on('read', this.onReadMessage);
var members = this.get('members') || [];
members.map(function(number) {
textsecure.storage.protocol.on('keychange:' + m.id, function() {
this.conversation.addKeyChange(m.id);
this.fetchContacts().then(function() {
this.contactCollection.each(function(contact) {
textsecure.storage.protocol.on('keychange:' + contact.id, function() {
this.addKeyChange(contact.id);
}.bind(this));
}.bind(this));
});
}.bind(this));
},

addKeyChange: function(id) {
Expand Down Expand Up @@ -323,7 +324,7 @@
} else {
var promises = [];
var members = this.get('members') || [];
this.contactCollection.add(
this.contactCollection.reset(
members.map(function(number) {
var c = ConversationController.create({
id : number,
Expand Down
12 changes: 5 additions & 7 deletions js/views/conversation_view.js
Expand Up @@ -269,14 +269,12 @@
},

messageDetail: function(e, data) {
return this.model.fetchContacts().then(function() {
var view = new Whisper.MessageDetailView({
model: data.message,
conversation: this.model
});
this.listenBack(view);
view.render();
var view = new Whisper.MessageDetailView({
model: data.message,
conversation: this.model
});
this.listenBack(view);
view.render();
},

listenBack: function(view) {
Expand Down

0 comments on commit 0854b19

Please sign in to comment.