rename showUserDetails -> avatarClick for conversationHeader

pull/715/head
Audric Ackermann 5 years ago
parent 43956709ad
commit ab0ff9c3ad

@ -259,7 +259,7 @@
window.Whisper.events.trigger('inviteFriends', this.model);
},
onShowUserDetails: pubkey => {
onAvatarClick: pubkey => {
if (this.model.isPrivate()) {
window.Whisper.events.trigger('onShowUserDetails', {
userPubKey: pubkey,

@ -80,14 +80,14 @@ interface Props {
onLeaveGroup: () => void;
onInviteFriends: () => void;
onShowUserDetails?: (userPubKey: string) => void;
onAvatarClick?: (userPubKey: string) => void;
i18n: LocalizerType;
}
export class ConversationHeader extends React.Component<Props> {
public showMenuBound: (event: React.MouseEvent<HTMLDivElement>) => void;
public onShowUserDetailsBound: (userPubKey: string) => void;
public onAvatarClickBound: (userPubKey: string) => void;
public menuTriggerRef: React.RefObject<any>;
public constructor(props: Props) {
@ -95,7 +95,7 @@ export class ConversationHeader extends React.Component<Props> {
this.menuTriggerRef = React.createRef();
this.showMenuBound = this.showMenu.bind(this);
this.onShowUserDetailsBound = this.onShowUserDetails.bind(this);
this.onAvatarClickBound = this.onAvatarClick.bind(this);
}
public showMenu(event: React.MouseEvent<HTMLDivElement>) {
@ -207,7 +207,7 @@ export class ConversationHeader extends React.Component<Props> {
borderColor={borderColor}
borderWidth={2}
onAvatarClick={() => {
this.onShowUserDetailsBound(phoneNumber);
this.onAvatarClickBound(phoneNumber);
}}
/>
</span>
@ -361,9 +361,9 @@ export class ConversationHeader extends React.Component<Props> {
);
}
public onShowUserDetails(userPubKey: string) {
if (this.props.onShowUserDetails) {
this.props.onShowUserDetails(userPubKey);
public onAvatarClick(userPubKey: string) {
if (this.props.onAvatarClick) {
this.props.onAvatarClick(userPubKey);
}
}

Loading…
Cancel
Save