make avatar in actionpanel not clickable

This commit is contained in:
Audric Ackermann 2020-01-09 16:02:05 +11:00
parent 5ef3a3086d
commit 1e79534615
2 changed files with 16 additions and 29 deletions

View File

@ -475,7 +475,7 @@ $session-compose-margin: 20px;
span {
padding: 5px 10px;
border-radius: 50px;
@include session-dark-background-lighter;
background-color: #121212;
color: $session-color-light-grey;
border: 1px solid $session-color-dark-grey;
}

View File

@ -40,38 +40,25 @@ const Section = ({
}) => {
const handleClick = onSelect
? () => {
onSelect(type);
if(type !== SectionType.Profile) {
onSelect(type);
}
}
: undefined;
if (type === SectionType.Profile) {
if (!isSelected) {
return (
<Avatar
avatarPath={avatarPath}
conversationType="direct"
i18n={window.i18n}
// tslint:disable-next-line: no-backbone-get-set-outside-model
phoneNumber={window.storage.get('primaryDevicePubKey')}
size={28}
onAvatarClick={handleClick}
/>
);
} else {
return (
<Avatar
avatarPath={avatarPath}
conversationType="direct"
i18n={window.i18n}
// tslint:disable-next-line: no-backbone-get-set-outside-model
phoneNumber={window.storage.get('primaryDevicePubKey')}
size={28}
onAvatarClick={handleClick}
borderColor={'#fff'}
/>
);
}
}
return (
<Avatar
avatarPath={avatarPath}
conversationType="direct"
i18n={window.i18n}
// tslint:disable-next-line: no-backbone-get-set-outside-model
phoneNumber={window.storage.get('primaryDevicePubKey')}
size={28}
onAvatarClick={handleClick}
/>
);
}
let iconType: SessionIconType;
switch (type) {