mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
MESSENGER-3310 use local personal note avatar and remove url of old rooms
This commit is contained in:
@@ -2397,10 +2397,19 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
|
||||
}
|
||||
else
|
||||
{
|
||||
[mxRoom.summary setRoomAvatarImageIn:roomPhotoCell.mxkImageView];
|
||||
|
||||
roomPhotoCell.userInteractionEnabled = (oneSelfPowerLevel >= [powerLevels minimumPowerLevelForSendingEventAsStateEvent:kMXEventTypeStringRoomAvatar]);
|
||||
roomPhotoCell.mxkImageView.alpha = roomPhotoCell.userInteractionEnabled ? 1.0f : 0.5f;
|
||||
// bwi if the room is a personal notes room use a local image
|
||||
if (BwiBuildSettings.bwiUseCustomPersonalNotesAvatar && [mxRoom isPersonalNotesRoom] ) {
|
||||
PersonalNotesDefaultService *service = [[PersonalNotesDefaultService alloc] initWithMxSession:self.mainSession];
|
||||
roomPhotoCell.mxkImageView.image = [UIImage imageNamed:service.avatarImageUrl];
|
||||
|
||||
roomPhotoCell.userInteractionEnabled = false;
|
||||
roomPhotoCell.mxkImageView.alpha = 0.5f;
|
||||
} else {
|
||||
[mxRoom.summary setRoomAvatarImageIn:roomPhotoCell.mxkImageView];
|
||||
|
||||
roomPhotoCell.userInteractionEnabled = (oneSelfPowerLevel >= [powerLevels minimumPowerLevelForSendingEventAsStateEvent:kMXEventTypeStringRoomAvatar]);
|
||||
roomPhotoCell.mxkImageView.alpha = roomPhotoCell.userInteractionEnabled ? 1.0f : 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
cell = roomPhotoCell;
|
||||
|
||||
Reference in New Issue
Block a user