RoomVC: Remove the beta warning modal when enabling e2e in a room

This is the other part of #2239.
This commit is contained in:
manuroe 2019-02-21 15:07:50 +01:00
parent ebd411698a
commit 932fcd888f
4 changed files with 4 additions and 47 deletions

View file

@ -6,6 +6,7 @@ Improvements:
* Maintenance: Update cocopoads and pods. Automatic update to Swift4.2.
* Add app store description as app string resource to make them available for translation on weblate (#2201).
* Update deprecated contact availability checks (#2222).
* RoomVC: Remove the beta warning modal when enabling e2e in a room (#2239).
Bug fix:
* Reskin: status bar text is no more readable on iPad (#2276).

View file

@ -494,7 +494,6 @@
"room_details_advanced_e2e_encryption_enabled"="Encryption is enabled in this room";
"room_details_advanced_e2e_encryption_disabled"="Encryption is not enabled in this room.";
"room_details_advanced_e2e_encryption_blacklist_unverified_devices"="Encrypt to verified devices only";
"room_details_advanced_e2e_encryption_prompt_message"="End-to-end encryption is experimental and may not be reliable.\n\nYou should not yet trust it to secure data.\n\nDevices will not yet be able to decrypt history from before they joined the room.\n\nOnce encryption is enabled for a room it cannot be turned off again (for now).\n\nEncrypted messages will not be visible on clients that do not yet implement encryption.";
"room_details_fail_to_update_avatar" = "Fail to update the room photo";
"room_details_fail_to_update_room_name" = "Fail to update the room name";
"room_details_fail_to_update_topic" = "Fail to update the topic";

View file

@ -1126,10 +1126,6 @@ internal enum VectorL10n {
internal static var roomDetailsAdvancedE2eEncryptionEnabled: String {
return VectorL10n.tr("Vector", "room_details_advanced_e2e_encryption_enabled")
}
/// End-to-end encryption is experimental and may not be reliable.\n\nYou should not yet trust it to secure data.\n\nDevices will not yet be able to decrypt history from before they joined the room.\n\nOnce encryption is enabled for a room it cannot be turned off again (for now).\n\nEncrypted messages will not be visible on clients that do not yet implement encryption.
internal static var roomDetailsAdvancedE2eEncryptionPromptMessage: String {
return VectorL10n.tr("Vector", "room_details_advanced_e2e_encryption_prompt_message")
}
/// Enable encryption (warning: cannot be disabled again!)
internal static var roomDetailsAdvancedEnableE2eEncryption: String {
return VectorL10n.tr("Vector", "room_details_advanced_enable_e2e_encryption")

View file

@ -3421,48 +3421,9 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti
{
if (theSwitch.on)
{
// Prompt here user before turning on the data encryption
__weak typeof(self) weakSelf = self;
[currentAlert dismissViewControllerAnimated:NO completion:nil];
currentAlert = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"warning", @"Vector", nil)
message:NSLocalizedStringFromTable(@"room_details_advanced_e2e_encryption_prompt_message", @"Vector", nil)
preferredStyle:UIAlertControllerStyleAlert];
[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
style:UIAlertActionStyleCancel
handler:^(UIAlertAction * action) {
if (weakSelf)
{
typeof(self) self = weakSelf;
self->currentAlert = nil;
}
// Reset switch change
theSwitch.on = NO;
}]];
[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"ok"]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
if (weakSelf)
{
typeof(self) self = weakSelf;
self->currentAlert = nil;
self->updatedItemsDict[kRoomSettingsEncryptionKey] = @(YES);
[self getNavigationItem].rightBarButtonItem.enabled = self->updatedItemsDict.count;
}
}]];
[currentAlert mxk_setAccessibilityIdentifier:@"RoomSettingsVCEnableEncryptionAlert"];
[self presentViewController:currentAlert animated:YES completion:nil];
updatedItemsDict[kRoomSettingsEncryptionKey] = @(YES);
[self getNavigationItem].rightBarButtonItem.enabled = self->updatedItemsDict.count;
}
else
{