End-to-end encryption UI/UX

#723

- Let user send clear attachments in encrypted rooms
This commit is contained in:
giomfo
2016-11-09 10:58:11 +01:00
parent b70b1e9104
commit 77ec06b131
4 changed files with 19 additions and 14 deletions
+10 -5
View File
@@ -958,9 +958,7 @@
RoomInputToolbarView *roomInputToolbarView = (RoomInputToolbarView*)self.inputToolbarView;
// Check whether the call option is supported
roomInputToolbarView.supportCallOption =
self.roomDataSource.mxSession.callManager
&& self.roomDataSource.room.state.joinedMembers.count >= 2;
roomInputToolbarView.supportCallOption = self.roomDataSource.mxSession.callManager && self.roomDataSource.room.state.joinedMembers.count >= 2;
// Set user picture in input toolbar
MXKImageView *userPictureView = roomInputToolbarView.pictureView;
@@ -993,8 +991,15 @@
roomInputToolbarView.supportCallOption &= ([[AppDelegate theDelegate] callStatusBarWindow] == nil);
}
// Encrypted?
roomInputToolbarView.isEncrypted = self.roomDataSource.room.state.isEncrypted;
// Check whether the encryption is enabled in the room
if (self.roomDataSource.room.state.isEncrypted)
{
// Encrypt the user's messages as soon as the user supports the encryption?
roomInputToolbarView.isEncryptionEnabled = (self.mainSession.crypto != nil);
// Call option is not supported in encrypted room yet - Hide the call button
roomInputToolbarView.supportCallOption = NO;
}
}
}