group photo fix

This commit is contained in:
Martti Malmi 2021-04-08 15:52:19 +03:00
parent 040d1c9db6
commit 94ad14cb61

View File

@ -344,9 +344,6 @@ class Profile extends View {
$('#profile .profile-about-content:not(:focus)').text(about);
}
});
renderGroupPhotoSettings(chat.uuid);
$('#profile .profile-photo-container').show();
Helpers.setImgSrc($('#profile .profile-photo'), chat.photo);
}
componentDidMount() {
@ -393,17 +390,6 @@ class Profile extends View {
var newGroupParticipant;
function renderGroupPhotoSettings(uuid) {
const me = Session.channels[uuid].participantProfiles[Session.getKey().pub];
const isAdmin = !!(me && me.permissions && me.permissions.admin);
$('#current-profile-photo').toggle(!!Session.channels[uuid].photo);
$('#profile .profile-photo').toggle(!!Session.channels[uuid].photo);
if (isAdmin) {
Helpers.setImgSrc($('#current-profile-photo'), Session.channels[uuid].photo);
$('#profile .profile-photo').hide();
}
}
function areWeAdmin(uuid) {
const me = Session.channels[uuid].participantProfiles[Session.getKey().pub];
return !!(me && me.permissions && me.permissions.admin);