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
@@ -49,9 +49,9 @@
@property (nonatomic) BOOL supportCallOption;
/**
Tell whether the room data is encrypted. NO by default.
Tell whether the filled data will be sent encrypted. NO by default.
*/
@property (nonatomic) BOOL isEncrypted;
@property (nonatomic) BOOL isEncryptionEnabled;
/**
Tell whether a call is active.
@@ -104,9 +104,9 @@
}
}
- (void)setIsEncrypted:(BOOL)isEncrypted
- (void)setIsEncryptionEnabled:(BOOL)isEncryptionEnabled
{
if (isEncrypted)
if (isEncryptionEnabled)
{
self.encryptedRoomIcon.hidden = NO;
self.messageComposerContainerLeadingConstraint.constant = ROOM_INPUT_TOOLBAR_VIEW_ENCRYPTED_MESSAGE_COMPOSER_CONTAINER_LEADING;
@@ -117,7 +117,7 @@
self.messageComposerContainerLeadingConstraint.constant = ROOM_INPUT_TOOLBAR_VIEW_DEFAULT_MESSAGE_COMPOSER_CONTAINER_LEADING;
}
_isEncrypted = isEncrypted;
_isEncryptionEnabled = isEncryptionEnabled;
}
- (void)setActiveCall:(BOOL)activeCall
@@ -151,9 +151,9 @@
[super growingTextViewDidChange:hpGrowingTextView];
if (self.isEncrypted)
if (self.isEncryptionEnabled)
{
// Disable attachments and call options
// Disable the attachments and the call options which are not supported yet.
self.rightInputToolbarButton.hidden = NO;
self.attachMediaButton.hidden = YES;
self.voiceCallButton.hidden = YES;
@@ -31,7 +31,7 @@
</constraints>
</view>
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="e2e_verified.png" translatesAutoresizingMaskIntoConstraints="NO" id="fRI-9x-jgw">
<rect key="frame" x="41" y="4" width="28" height="28"/>
<rect key="frame" x="41" y="7" width="28" height="28"/>
<constraints>
<constraint firstAttribute="height" constant="28" id="JHs-nc-tML"/>
<constraint firstAttribute="width" constant="28" id="K0H-Va-ZsL"/>
@@ -107,6 +107,7 @@
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="fRI-9x-jgw" firstAttribute="top" secondItem="a84-Vc-6ud" secondAttribute="top" constant="7" id="08y-JY-NN5"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="46" id="1FO-iu-urG"/>
<constraint firstItem="G8Z-CM-tGs" firstAttribute="top" secondItem="a84-Vc-6ud" secondAttribute="top" id="8cV-eb-Kog"/>
<constraint firstItem="3ln-yI-ef9" firstAttribute="leading" secondItem="a84-Vc-6ud" secondAttribute="leading" constant="10" id="BwP-sF-qE1"/>
@@ -115,7 +116,6 @@
<constraint firstItem="fRI-9x-jgw" firstAttribute="leading" secondItem="a84-Vc-6ud" secondAttribute="leading" constant="41" id="GvU-rY-bWW"/>
<constraint firstItem="dd4-pE-Es1" firstAttribute="leading" secondItem="a84-Vc-6ud" secondAttribute="leading" constant="13" id="Jem-U2-oEq"/>
<constraint firstAttribute="bottom" secondItem="QWp-NV-uh5" secondAttribute="bottom" constant="4" id="NGr-2o-sOP"/>
<constraint firstItem="fRI-9x-jgw" firstAttribute="top" secondItem="3ln-yI-ef9" secondAttribute="bottom" constant="3" id="ROx-9Q-aOf"/>
<constraint firstAttribute="trailing" secondItem="3ln-yI-ef9" secondAttribute="trailing" constant="10" id="RXB-PN-3n8"/>
<constraint firstAttribute="trailing" secondItem="G8Z-CM-tGs" secondAttribute="trailing" constant="4" id="Sua-LC-3yW"/>
<constraint firstAttribute="bottom" secondItem="Owf-M8-qJi" secondAttribute="bottom" id="Wo7-Qc-PSL"/>