diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 3147034c6..df9756158 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -153,7 +153,7 @@ "directory_search_results_title" = "Browse directory results"; "directory_search_results" = "%tu results found for %@"; "directory_search_results_more_than" = ">%tu results found for %@"; -"directory_searching_title" = "Searching directory..."; +"directory_searching_title" = "Searching directory…"; "directory_search_fail" = "Failed to fetch data"; // Contacts @@ -210,10 +210,12 @@ // Chat "room_new_message_notification" = "%d new message"; "room_new_messages_notification" = "%d new messages"; -"room_one_user_is_typing" = "%@ is typing..."; -"room_two_users_are_typing" = "%@ & %@ are typing..."; -"room_many_users_are_typing" = "%@, %@ & others are typing..."; -"room_message_placeholder" = "Type a message..."; +"room_one_user_is_typing" = "%@ is typing…"; +"room_two_users_are_typing" = "%@ & %@ are typing…"; +"room_many_users_are_typing" = "%@, %@ & others are typing…"; +"room_message_placeholder" = "Send a message (unencrypted)…"; +"encrypted_room_message_placeholder" = "Send an encrypted message…"; +"room_message_short_placeholder" = "Send a message…"; "room_offline_notification" = "Connectivity to the server has been lost."; "room_unsent_messages_notification" = "Messages not sent. %@ or %@ now?"; "room_unsent_messages_unknown_devices_notification" = "Message not sent due to unknown devices being present. %@ or %@ now?"; @@ -246,7 +248,7 @@ "unknown_devices_send_anyway" = "Send Anyway"; "unknown_devices_call_anyway" = "Call Anyway"; "unknown_devices_answer_anyway" = "Answer Anyway"; -"unknown_devices_verify" = "Verify..."; +"unknown_devices_verify" = "Verify…"; "unknown_devices_title" = "Unknown devices"; // Room Title diff --git a/Riot/ViewController/RoomViewController.m b/Riot/ViewController/RoomViewController.m index e45fa3491..36ee0b406 100644 --- a/Riot/ViewController/RoomViewController.m +++ b/Riot/ViewController/RoomViewController.m @@ -2390,15 +2390,13 @@ completion (finished); } - // Here the placeholder may have been defined temporarily to display IRC command usage. - // The original placeholder (savedInputToolbarPlaceholder) will be restored during the handling of the next typing notification + // Consider here the saved placeholder only if no new placeholder has been defined during the height animation. if (!toolbarView.placeholder) { // Restore the placeholder if any toolbarView.placeholder = savedInputToolbarPlaceholder.length ? savedInputToolbarPlaceholder : nil; - savedInputToolbarPlaceholder = nil; } - + savedInputToolbarPlaceholder = nil; }]; } } diff --git a/Riot/Views/RoomInputToolbar/RoomInputToolbarView.m b/Riot/Views/RoomInputToolbar/RoomInputToolbarView.m index eaa7fd25b..7357285ea 100644 --- a/Riot/Views/RoomInputToolbar/RoomInputToolbarView.m +++ b/Riot/Views/RoomInputToolbar/RoomInputToolbarView.m @@ -19,6 +19,8 @@ #import "RiotDesignValues.h" +#import "GBDeviceInfo_iOS.h" + #import "UINavigationController+Riot.h" #import @@ -82,7 +84,7 @@ growingTextView.textColor = kRiotTextColorBlack; growingTextView.tintColor = kRiotColorGreen; - self.placeholder = NSLocalizedStringFromTable(@"room_message_placeholder", @"Vector", nil); + self.isEncryptionEnabled = _isEncryptionEnabled; } - (void)setSupportCallOption:(BOOL)supportCallOption @@ -106,16 +108,34 @@ - (void)setIsEncryptionEnabled:(BOOL)isEncryptionEnabled { - if (isEncryptionEnabled) + _isEncryptionEnabled = isEncryptionEnabled; + + // Consider the default placeholder + NSString *placeholder= NSLocalizedStringFromTable(@"room_message_short_placeholder", @"Vector", nil); + + if (_isEncryptionEnabled) { self.encryptedRoomIcon.image = [UIImage imageNamed:@"e2e_verified"]; + + // Check the device screen size before using large placeholder + if ([GBDeviceInfo deviceInfo].family == GBDeviceFamilyiPad || [GBDeviceInfo deviceInfo].displayInfo.display >= GBDeviceDisplay4p7Inch) + { + placeholder = NSLocalizedStringFromTable(@"encrypted_room_message_placeholder", @"Vector", nil); + } } else { self.encryptedRoomIcon.image = [UIImage imageNamed:@"e2e_unencrypted"]; + + // Check the device screen size before using large placeholder + if ([GBDeviceInfo deviceInfo].family == GBDeviceFamilyiPad || [GBDeviceInfo deviceInfo].displayInfo.display >= GBDeviceDisplay4p7Inch) + { + placeholder = NSLocalizedStringFromTable(@"room_message_placeholder", @"Vector", nil); + } } - _isEncryptionEnabled = isEncryptionEnabled; + + self.placeholder = placeholder; } - (void)setActiveCall:(BOOL)activeCall