mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 21:53:18 +00:00
New contact popup when clicking on group member or avatar
This commit is contained in:
committed by
GitHub
parent
cd599f92c8
commit
d593f74241
@@ -18,6 +18,7 @@
|
||||
this.ourNumber = textsecure.storage.user.getNumber();
|
||||
this.listenBack = options.listenBack;
|
||||
this.loading = false;
|
||||
this.conversation = options.conversation;
|
||||
|
||||
this.listenTo(this.model, 'change', this.render);
|
||||
},
|
||||
@@ -27,34 +28,23 @@
|
||||
this.contactView = null;
|
||||
}
|
||||
|
||||
const formattedContact = this.model.format();
|
||||
|
||||
this.contactView = new Whisper.ReactWrapperView({
|
||||
className: 'contact-wrapper',
|
||||
Component: window.Signal.Components.ContactListItem,
|
||||
props: {
|
||||
...this.model.format(),
|
||||
onClick: this.showIdentity.bind(this),
|
||||
...formattedContact,
|
||||
onClick: () =>
|
||||
this.conversation.trigger(
|
||||
'show-contact-modal',
|
||||
formattedContact.id
|
||||
),
|
||||
},
|
||||
});
|
||||
this.$el.append(this.contactView.el);
|
||||
return this;
|
||||
},
|
||||
showIdentity() {
|
||||
if (this.model.isMe() || this.loading) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.render();
|
||||
|
||||
this.panelView = new Whisper.KeyVerificationPanelView({
|
||||
model: this.model,
|
||||
onLoad: view => {
|
||||
this.loading = false;
|
||||
this.listenBack(view);
|
||||
this.render();
|
||||
},
|
||||
});
|
||||
},
|
||||
}),
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
className: 'members',
|
||||
toInclude: {
|
||||
listenBack: options.listenBack,
|
||||
conversation: options.conversation,
|
||||
},
|
||||
});
|
||||
this.member_list_view.render();
|
||||
|
||||
Reference in New Issue
Block a user