click on our avatar show the edit profile dialog & fix lint

pull/681/head
Audric Ackermann 6 years ago
parent 14dab92989
commit 531b782669

@ -1014,6 +1014,13 @@
}); });
Whisper.events.on('onShowUserDetails', async ({ userPubKey }) => { Whisper.events.on('onShowUserDetails', async ({ userPubKey }) => {
const isMe = userPubKey === textsecure.storage.user.getNumber();
if (isMe) {
Whisper.events.trigger('onEditProfile');
return;
}
const conversation = await ConversationController.getOrCreateAndWait( const conversation = await ConversationController.getOrCreateAndWait(
userPubKey, userPubKey,
'private' 'private'

@ -54,10 +54,7 @@ export class Avatar extends React.PureComponent<Props, State> {
return this.renderNoImage(); return this.renderNoImage();
} }
const borderStyle = this.getBorderStyle( const borderStyle = this.getBorderStyle(borderColor, borderWidth);
borderColor,
borderWidth,
);
// Generate the seed // Generate the seed
const hash = phoneNumber.substring(0, 12); const hash = phoneNumber.substring(0, 12);
@ -215,11 +212,11 @@ export class Avatar extends React.PureComponent<Props, State> {
const borderWidth = typeof width === 'number' ? width : 3; const borderWidth = typeof width === 'number' ? width : 3;
return color return color
? { ? {
borderColor: color, borderColor: color,
borderStyle: 'solid', borderStyle: 'solid',
borderWidth: borderWidth, borderWidth: borderWidth,
} }
: undefined; : undefined;
} }
} }

Loading…
Cancel
Save