mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 08:32:53 +02:00
Add encryption badge
This commit is contained in:
+17
@@ -85,6 +85,23 @@ final class RoomCreationEventsModalViewModel: RoomCreationEventsModalViewModelTy
|
||||
avatarImageView.image = avatarImage
|
||||
}
|
||||
}
|
||||
func setEncryptionIcon(in imageView: UIImageView) {
|
||||
guard let summary = session.roomSummary(withRoomId: roomState.roomId) else {
|
||||
imageView.image = nil
|
||||
imageView.isHidden = true
|
||||
return
|
||||
}
|
||||
|
||||
if (summary.isEncrypted)
|
||||
{
|
||||
imageView.isHidden = false
|
||||
imageView.image = EncryptionTrustLevelBadgeImageHelper.roomBadgeImage(for: summary.roomEncryptionTrustLevel())
|
||||
}
|
||||
else
|
||||
{
|
||||
imageView.isHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user