Skip to content

Commit

Permalink
DM Details View (#744)
Browse files Browse the repository at this point in the history
* Basic implementation completed but it requires some bug fixing and polishing (+4 squashed commits)
Squashed commits:
[43f0064e] now the content of the room details reflects the expected dm details content when the conditions are met
[fe6f2b5e] replaced existing headers with a composable and reusable HeaderView
[3c00120a] now the members are fetched every time the room is opened
[421d539b] refactored the members fetching to be immediate in case the room could be a direct chat

* polished the code and fixed some bugs that prevented the updated state of the members to be displayed in the room details view (+1 squashed commit)
Squashed commits:
[6bf98473] fix for the button not being destructive in room details screen

* removed copy button and updated copy

* moved a file and renamed header view

* addressed all PR comments

* sdk bump

* UI tests

* unit tests

* changelog

* updated mocks

* removed a duplicated signature in a mock
  • Loading branch information
Velin92 authored Apr 3, 2023
1 parent 220138d commit 0f858d9
Show file tree
Hide file tree
Showing 35 changed files with 1,232 additions and 232 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
{
"identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing.git",
"state" : {
"revision" : "cef5b3f6f11781dd4591bdd1dd0a3d22bd609334",
"version" : "1.11.0"
Expand Down
11 changes: 10 additions & 1 deletion ElementX/Resources/Localizations/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"action_save" = "Save";
"action_search" = "Search";
"action_send" = "Send";
"action_share_link" = "Share link";
"action_share_link" = "Share";
"action_skip" = "Skip";
"action_start" = "Start";
"action_start_chat" = "Start chat";
Expand All @@ -47,6 +47,7 @@
"common_about" = "About";
"common_audio" = "Audio";
"common_bubbles" = "Bubbles";
"common_creating_room" = "Creating room…";
"common_decryption_error" = "Decryption error";
"common_developer_options" = "Developer options";
"common_edited_suffix" = "(edited)";
Expand Down Expand Up @@ -104,6 +105,7 @@
"emoji_picker_category_symbols" = "Symbols";
"error_failed_creating_the_permalink" = "Failed creating the permalink";
"error_failed_loading_messages" = "Failed loading messages";
"error_no_compatible_app_found" = "No compatible app was found to handle this action.";
"error_some_messages_have_not_been_sent" = "Some messages have not been sent";
"error_unknown" = "Sorry, an error occurred";
"invite_friends_text" = "Hey, talk to me on %1$@: %2$@";
Expand Down Expand Up @@ -154,6 +156,12 @@
"screen_create_room_action_create_room" = "New room";
"screen_create_room_action_invite_people" = "Invite people";
"screen_create_room_add_people_title" = "Add people";
"screen_dm_details_block_alert_action" = "Block";
"screen_dm_details_block_alert_description" = "Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.";
"screen_dm_details_block_user" = "Block user";
"screen_dm_details_unblock_alert_action" = "Unblock";
"screen_dm_details_unblock_alert_description" = "On unblocking the user, you will be able to see all messages by them again.";
"screen_dm_details_unblock_user" = "Unblock user";
"screen_login_error_deactivated_account" = "This account has been deactivated.";
"screen_login_error_invalid_credentials" = "Incorrect username and/or password";
"screen_login_error_invalid_user_id" = "This is not a valid user identifier. Expected format: ‘@user:homeserver.org’";
Expand All @@ -174,6 +182,7 @@
"screen_room_details_leave_room_title" = "Leave room";
"screen_room_details_people_title" = "People";
"screen_room_details_security_title" = "Security";
"screen_room_details_share_room_title" = "Share room";
"screen_room_details_topic_title" = "Topic";
"screen_room_member_details_block_alert_action" = "Block";
"screen_room_member_details_block_alert_description" = "Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.";
Expand Down
11 changes: 10 additions & 1 deletion ElementX/Resources/Localizations/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"action_save" = "Save";
"action_search" = "Search";
"action_send" = "Send";
"action_share_link" = "Share link";
"action_share_link" = "Share";
"action_skip" = "Skip";
"action_start" = "Start";
"action_start_chat" = "Start chat";
Expand All @@ -47,6 +47,7 @@
"common_about" = "About";
"common_audio" = "Audio";
"common_bubbles" = "Bubbles";
"common_creating_room" = "Creating room…";
"common_decryption_error" = "Decryption error";
"common_developer_options" = "Developer options";
"common_edited_suffix" = "(edited)";
Expand Down Expand Up @@ -104,6 +105,7 @@
"emoji_picker_category_symbols" = "Symbols";
"error_failed_creating_the_permalink" = "Failed creating the permalink";
"error_failed_loading_messages" = "Failed loading messages";
"error_no_compatible_app_found" = "No compatible app was found to handle this action.";
"error_some_messages_have_not_been_sent" = "Some messages have not been sent";
"error_unknown" = "Sorry, an error occurred";
"invite_friends_text" = "Hey, talk to me on %1$@: %2$@";
Expand Down Expand Up @@ -154,6 +156,12 @@
"screen_create_room_action_create_room" = "New room";
"screen_create_room_action_invite_people" = "Invite people";
"screen_create_room_add_people_title" = "Add people";
"screen_dm_details_block_alert_action" = "Block";
"screen_dm_details_block_alert_description" = "Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.";
"screen_dm_details_block_user" = "Block user";
"screen_dm_details_unblock_alert_action" = "Unblock";
"screen_dm_details_unblock_alert_description" = "On unblocking the user, you will be able to see all messages by them again.";
"screen_dm_details_unblock_user" = "Unblock user";
"screen_login_error_deactivated_account" = "This account has been deactivated.";
"screen_login_error_invalid_credentials" = "Incorrect username and/or password";
"screen_login_error_invalid_user_id" = "This is not a valid user identifier. Expected format: ‘@user:homeserver.org’";
Expand All @@ -174,6 +182,7 @@
"screen_room_details_leave_room_title" = "Leave room";
"screen_room_details_people_title" = "People";
"screen_room_details_security_title" = "Security";
"screen_room_details_share_room_title" = "Share room";
"screen_room_details_topic_title" = "Topic";
"screen_room_member_details_block_alert_action" = "Block";
"screen_room_member_details_block_alert_description" = "Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.";
Expand Down
16 changes: 16 additions & 0 deletions ElementX/Resources/Localizations/en.lproj/Localizable.stringsdict
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,21 @@
<string>%1$d room changes</string>
</dict>
</dict>
<key>screen_room_member_list_header_title</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@COUNT@</string>
<key>COUNT</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>1 person</string>
<key>other</key>
<string>%1$d people</string>
</dict>
</dict>
</dict>
</plist>
11 changes: 10 additions & 1 deletion ElementX/Resources/Localizations/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"action_save" = "Save";
"action_search" = "Search";
"action_send" = "Send";
"action_share_link" = "Share link";
"action_share_link" = "Share";
"action_skip" = "Skip";
"action_start" = "Start";
"action_start_chat" = "Start chat";
Expand All @@ -47,6 +47,7 @@
"common_about" = "About";
"common_audio" = "Audio";
"common_bubbles" = "Bubbles";
"common_creating_room" = "Creating room…";
"common_decryption_error" = "Decryption error";
"common_developer_options" = "Developer options";
"common_edited_suffix" = "(edited)";
Expand Down Expand Up @@ -104,6 +105,7 @@
"emoji_picker_category_symbols" = "Symbols";
"error_failed_creating_the_permalink" = "Failed creating the permalink";
"error_failed_loading_messages" = "Failed loading messages";
"error_no_compatible_app_found" = "No compatible app was found to handle this action.";
"error_some_messages_have_not_been_sent" = "Some messages have not been sent";
"error_unknown" = "Sorry, an error occurred";
"invite_friends_text" = "Hey, talk to me on %1$@: %2$@";
Expand Down Expand Up @@ -154,6 +156,12 @@
"screen_create_room_action_create_room" = "New room";
"screen_create_room_action_invite_people" = "Invite people";
"screen_create_room_add_people_title" = "Add people";
"screen_dm_details_block_alert_action" = "Block";
"screen_dm_details_block_alert_description" = "Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.";
"screen_dm_details_block_user" = "Block user";
"screen_dm_details_unblock_alert_action" = "Unblock";
"screen_dm_details_unblock_alert_description" = "On unblocking the user, you will be able to see all messages by them again.";
"screen_dm_details_unblock_user" = "Unblock user";
"screen_login_error_deactivated_account" = "This account has been deactivated.";
"screen_login_error_invalid_credentials" = "Incorrect username and/or password";
"screen_login_error_invalid_user_id" = "This is not a valid user identifier. Expected format: ‘@user:homeserver.org’";
Expand All @@ -174,6 +182,7 @@
"screen_room_details_leave_room_title" = "Leave room";
"screen_room_details_people_title" = "People";
"screen_room_details_security_title" = "Security";
"screen_room_details_share_room_title" = "Share room";
"screen_room_details_topic_title" = "Topic";
"screen_room_member_details_block_alert_action" = "Block";
"screen_room_member_details_block_alert_description" = "Blocked users will not be able to send you messages and all message by them will be hidden. You can reverse this action anytime.";
Expand Down
Loading

0 comments on commit 0f858d9

Please sign in to comment.