From db86bbc42bb04c9124cb62e68035e46815f7bd60 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Tue, 8 Nov 2022 10:19:25 +0200 Subject: [PATCH] Bump build to 436 (#6746) * Revert "Downgrade mmkv and bump to 435 (#6742)" This reverts commit 66b469bb31c260da614e2b3d7aabc84532c7ba35. * Revert "Bump Version to 1.56.0 and build to 431 (#6723)" This reverts commit fdee027b4aae3e2ef2e330d054149e00482c4268. * Revert "[V1] update deps (#6666)" This reverts commit 8137241f1256abcc920da18d32c23cc43bc8c569. * bump build to 436 * update snapshots --- .circleci/config.yml | 13 +- .eslintrc.json | 4 +- .flowconfig | 4 +- .gitignore | 10 +- android/app/build.gradle | 160 +- android/app/src/debug/AndroidManifest.xml | 2 +- .../debug/java/com/rn/ReactNativeFlipper.java | 5 +- android/app/src/main/AndroidManifest.xml | 2 +- .../MainApplicationReactNativeHost.java | 116 - .../components/MainComponentsRegistry.java | 36 - ...ApplicationTurboModuleManagerDelegate.java | 48 - .../com/mattermost/rnbeta/MainActivity.java | 59 +- .../mattermost/rnbeta/MainApplication.java | 118 +- .../app/src/main/jni/MainComponentsRegistry.h | 32 - android/app/src/main/jni/OnLoad.cpp | 11 - android/build.gradle | 13 +- android/gradle.properties | 13 +- android/settings.gradle | 7 - .../__snapshots__/badge.test.js.snap | 24 +- .../__snapshots__/fade.test.js.snap | 12 +- .../profile_picture_button.test.js.snap | 6 +- .../__snapshots__/swiper.test.js.snap | 8 +- .../announcement_banner.test.js.snap | 24 +- .../__snapshots__/at_mention.test.js.snap | 18 +- .../__snapshots__/index.test.js.snap | 4 +- app/components/autocomplete/autocomplete.js | 2 +- .../emoji_suggestion.test.js.snap | 12 +- .../slash_suggestion.test.tsx.snap | 16 +- .../app_slash_suggestion.test.tsx.snap | 10 +- .../slash_suggestion_item.tsx | 12 +- .../autocomplete_selector.tsx | 2 - .../__snapshots__/avatars.test.tsx.snap | 26 +- app/components/badge.js | 4 +- .../__snapshots__/channel_link.test.js.snap | 4 +- .../__snapshots__/channel_loader.test.js.snap | 150 +- .../__snapshots__/index.test.js.snap | 28 +- .../__snapshots__/user_list_test.test.js.snap | 76 +- .../__snapshots__/clear_button.test.tsx.snap | 8 +- .../custom_status_emoji.test.tsx.snap | 8 +- .../custom_status_expiry.test.tsx.snap | 12 +- .../custom_status_text.test.tsx.snap | 8 +- .../edit_channel_info.test.js.snap | 74 +- .../__snapshots__/emoji_picker.test.js.snap | 8404 ++++---- .../__snapshots__/error_text.test.js.snap | 8 +- .../__snapshots__/thread_footer.test.tsx.snap | 22 +- .../__snapshots__/thread_item.test.tsx.snap | 58 +- .../__snapshots__/index.test.tsx.snap | 52 +- .../global_threads/thread_list/index.tsx | 6 +- .../__snapshots__/index.test.tsx.snap | 14 +- .../load_more_posts/load_more_posts.js | 3 +- app/components/loading.js | 2 +- .../__snapshots__/markdown.test.js.snap | 16 +- .../hashtag/__snapshots__/index.test.js.snap | 2 +- .../latex_code_block.test.js.snap | 44 +- .../__snapshots__/latex_inline.test.js.snap | 28 +- .../__snapshots__/markdown_emoji.test.js.snap | 38 +- .../__snapshots__/markdown_table.test.js.snap | 34 +- .../markdown_table_image.tsx | 2 + app/components/markdown/transform.test.js | 44 + .../__snapshots__/post_draft.test.js.snap | 134 +- .../__snapshots__/archived.test.js.snap | 12 +- .../__snapshots__/post_input.test.js.snap | 2 +- .../__snapshots__/quick_actions.test.js.snap | 12 +- .../camera_quick_action.test.js.snap | 4 +- .../file_quick_action.test.js.snap | 4 +- .../image_quick_action.test.js.snap | 4 +- .../input_quick_action.test.js.snap | 2 +- .../__snapshots__/read_only.test.js.snap | 14 +- .../__snapshots__/send.test.js.snap | 16 +- .../__snapshots__/upload_item.test.js.snap | 12 +- .../__snapshots__/upload_remove.test.js.snap | 4 +- .../__snapshots__/post_list.test.js.snap | 14 +- .../__snapshots__/date_separator.test.js.snap | 124 +- .../more_messages_button.test.js.snap | 34 +- .../more_messages_button.tsx | 2 - .../attachment_footer.test.tsx.snap | 12 +- .../system_message_helpers.test.js.snap | 100 +- app/components/post_list/post_list.tsx | 10 +- .../progressive_image.test.js.snap | 44 +- .../radio_button_group.test.js.snap | 4 +- .../reaction_picker.test.js.snap | 44 +- .../__snapshots__/search_bar.test.js.snap | 34 +- .../__snapshots__/main_sidebar.test.js.snap | 2 +- .../__snapshots__/channel_item.test.js.snap | 226 +- .../__snapshots__/filtered_list.test.js.snap | 38 +- .../list/__snapshots__/list.test.js.snap | 28 +- .../sidebars/main/channels_list/list/index.js | 16 +- .../switch_teams_button.test.js.snap | 16 +- .../unread_indicator/unread_indicator.base.js | 2 +- .../teams_list_item.test.js.snap | 20 +- .../__snapshots__/drawer_item.test.js.snap | 46 +- .../settings_sidebar.test.js.snap | 10 +- .../slide_up_panel_indicator.test.js.snap | 4 +- app/components/tag.js | 3 +- .../__snapshots__/team_icon.test.js.snap | 14 +- .../__snapshots__/user_status.test.js.snap | 8 +- app/components/vector_icon.js | 4 +- .../__snapshots__/radio_setting.test.js.snap | 28 +- .../widgets/settings/bool_setting.tsx | 2 +- .../mattermost-managed.ios.js | 1 - .../entities/__snapshots__/apps.test.js.snap | 226 +- app/mm-redux/reducers/entities/posts.test.js | 2 + .../__snapshots__/call_avatar.test.js.snap | 30 +- .../__snapshots__/call_duration.test.js.snap | 2 +- .../floating_call_container.test.js.snap | 8 +- .../__snapshots__/call_message.test.js.snap | 60 +- .../__snapshots__/current_call.test.js.snap | 42 +- .../components/floating_call_container.tsx | 2 +- .../__snapshots__/join_call.test.js.snap | 18 +- app/products/calls/hooks.ts | 1 - .../__snapshots__/call_screen.test.js.snap | 414 +- .../__snapshots__/action.test.js.snap | 44 +- .../call_other_actions.test.js.snap | 6 +- .../__snapshots__/add_reaction.test.js.snap | 2 +- .../apps_form_component.test.tsx.snap | 50 +- .../dialog_introduction_text.test.tsx.snap | 58 +- .../apps_form/apps_form_component.test.tsx | 15 +- app/screens/apps_form/apps_form_component.tsx | 9 - app/screens/apps_form/apps_form_container.tsx | 3 - .../channel_nav_bar.test.js.snap | 37 +- ...ettings_sidebar_drawer_button.test.js.snap | 4 +- .../channel_search_button.test.js.snap | 8 +- .../__snapshots__/channel_title.test.js.snap | 100 +- .../main_sidebar_drawer_button.test.js.snap | 20 +- .../channel_post_list.test.js.snap | 10 +- .../__snapshots__/channel_info.test.js.snap | 250 +- .../channel_info_header.test.js.snap | 784 +- .../channel_info_row.test.js.snap | 14 +- .../__snapshots__/add_members.test.js.snap | 4 +- .../channel_info/add_members/add_members.tsx | 1 - .../__snapshots__/archive.test.js.snap | 8 +- app/screens/channel_info/archive/archive.tsx | 5 - .../convert_private.test.js.snap | 4 +- .../convert_private/convert_private.tsx | 6 - .../__snapshots__/edit_channel.test.js.snap | 4 +- .../edit_channel/edit_channel.tsx | 1 - .../__snapshots__/favorite.test.js.snap | 4 +- .../ignore_mentions.test.js.snap | 4 +- .../leave/__snapshots__/leave.test.js.snap | 16 +- app/screens/channel_info/leave/leave.tsx | 1 - .../__snapshots__/manage_members.test.js.snap | 10 +- .../manage_members/manage_members.tsx | 3 +- .../mute/__snapshots__/mute.test.js.snap | 4 +- .../notification_preference.test.js.snap | 2 +- .../notification_preference.tsx | 2 - .../pinned/__snapshots__/pinned.test.js.snap | 2 +- app/screens/channel_info/pinned/pinned.tsx | 3 +- .../channel_members.test.js.snap | 18 +- ...annel_notification_preference.test.js.snap | 40 +- .../custom_status_modal.test.tsx.snap | 56 +- .../custom_status_suggestion.test.tsx.snap | 26 +- .../clear_after_menu_item.test.tsx.snap | 22 +- .../clear_after_modal.test.tsx.snap | 12 +- .../date_time_selector.test.tsx.snap | 28 +- .../date_time_selector.tsx | 4 +- .../__snapshots__/edit_post.test.js.snap | 30 +- .../__snapshots__/edit_profile.test.js.snap | 2 +- .../error_teams_list.test.js.snap | 8 +- .../forgot_password.test.js.snap | 80 +- app/screens/gallery/gallery_viewer.tsx | 4 +- .../dialog_introduction_text.test.js.snap | 58 +- .../interactive_dialog.test.js.snap | 10 +- .../latex/__snapshots__/latex.test.js.snap | 66 +- .../__snapshots__/more_channels.test.js.snap | 22 +- .../__snapshots__/selected_users.test.js.snap | 34 +- app/screens/notification/index.tsx | 1 - .../options_modal_list.test.js.snap | 32 +- .../__snapshots__/permalink.test.js.snap | 26 +- .../__snapshots__/pinned_posts.test.js.snap | 26 +- .../__snapshots__/post_options.test.js.snap | 46 +- .../reaction_header.test.js.snap | 12 +- .../reaction_header_item.test.js.snap | 18 +- .../__snapshots__/reaction_list.test.js.snap | 38 +- .../__snapshots__/reaction_row.test.js.snap | 16 +- .../recent_mentions.test.js.snap | 20 +- .../__snapshots__/saved_posts.test.js.snap | 20 +- .../__snapshots__/modifier.test.js.snap | 14 +- .../__snapshots__/recent_item.test.js.snap | 6 +- .../search/__snapshots__/search.test.js.snap | 42 +- .../channel_display_name.test.js.snap | 12 +- .../search_result_post.test.js.snap | 2 +- .../__snapshots__/select_team.test.js.snap | 32 +- .../selector_screen.test.tsx.snap | 86 +- .../selected_options.test.tsx.snap | 16 +- .../selector_screen/selector_screen.tsx | 1 - .../display_settings.test.js.snap | 34 +- .../notification_settings.test.js.snap | 176 +- ...cation_settings_email.android.test.js.snap | 36 +- ...tification_settings_email.ios.test.js.snap | 14 +- ...on_settings_mentions_keywords.test.js.snap | 60 +- .../__snapshots__/sidebar.test.js.snap | 18 +- .../theme/__snapshots__/theme.test.js.snap | 30 +- .../select_timezone.test.js.snap | 16 +- app/screens/sso/index.tsx | 2 - .../terms_of_service.test.js.snap | 206 +- .../__snapshots__/thread.ios.test.js.snap | 22 +- .../thread_options.test.tsx.snap | 18 +- .../__snapshots__/user_profile.test.js.snap | 182 +- app/store/helpers.ts | 2 +- detox/e2e/support/server_api/ldap.js | 4 +- detox/e2e/support/server_api/system.js | 3 +- detox/e2e/support/server_api/team.js | 4 +- .../e2e/support/ui/component/autocomplete.js | 2 - .../e2e/support/ui/component/main_sidebar.js | 2 - .../e2e/support/ui/component/post_options.js | 2 - .../support/ui/component/settings_sidebar.js | 2 - detox/e2e/support/ui/screen/about.js | 2 - detox/e2e/support/ui/screen/add_reaction.js | 2 - .../support/ui/screen/advanced_settings.js | 2 - detox/e2e/support/ui/screen/channel.js | 2 - .../support/ui/screen/channel_add_members.js | 2 - detox/e2e/support/ui/screen/channel_info.js | 2 - .../e2e/support/ui/screen/channel_members.js | 2 - .../screen/channel_notification_preference.js | 2 - .../ui/screen/clock_display_settings.js | 2 - detox/e2e/support/ui/screen/create_channel.js | 2 - detox/e2e/support/ui/screen/custom_status.js | 2 - .../ui/screen/custom_status_clear_after.js | 1 - .../e2e/support/ui/screen/display_settings.js | 2 - detox/e2e/support/ui/screen/edit_channel.js | 2 - detox/e2e/support/ui/screen/edit_post.js | 2 - detox/e2e/support/ui/screen/edit_profile.js | 2 - .../e2e/support/ui/screen/general_settings.js | 2 - detox/e2e/support/ui/screen/login.js | 2 - detox/e2e/support/ui/screen/more_channels.js | 2 - .../support/ui/screen/more_direct_messages.js | 2 - detox/e2e/support/ui/screen/notification.js | 2 - .../ui/screen/notification_settings.js | 2 - .../ui/screen/notification_settings_email.js | 2 - .../ui/screen/notification_settings_mobile.js | 2 - detox/e2e/support/ui/screen/permalink.js | 2 - .../e2e/support/ui/screen/pinned_messages.js | 2 - detox/e2e/support/ui/screen/reaction_list.js | 2 - .../e2e/support/ui/screen/recent_mentions.js | 2 - detox/e2e/support/ui/screen/saved_messages.js | 3 +- detox/e2e/support/ui/screen/search.js | 2 - detox/e2e/support/ui/screen/select_team.js | 2 - detox/e2e/support/ui/screen/table.js | 2 - detox/e2e/support/ui/screen/thread.js | 2 - detox/e2e/support/ui/screen/user_profile.js | 2 - detox/e2e/support/utils/email.js | 3 +- .../account_settings/advanced_settings.e2e.js | 2 - .../account_settings/clock_display.e2e.js | 1 - .../account_settings/language_settings.e2e.js | 2 - .../test/account_settings/user_profile.e2e.js | 2 - detox/e2e/test/autocomplete/at_mention.e2e.js | 2 - .../e2e/test/autocomplete/autocomplete.e2e.js | 2 - .../e2e/test/autocomplete/edit_channel.e2e.js | 2 - detox/e2e/test/autocomplete/edit_post.e2e.js | 2 - detox/e2e/test/autocomplete/post_draft.e2e.js | 2 - detox/e2e/test/autocomplete/search.e2e.js | 2 - detox/e2e/test/bot_account/bot_account.e2e.js | 2 - .../remove_user_from_channel.e2e.js | 2 - .../channel_add_members.e2e.js | 2 - .../test/channel_settings/channel_info.e2e.js | 2 - .../channel_view_members.e2e.js | 2 - .../test/channels/archived_channels.e2e.js | 2 - detox/e2e/test/channels/channels_list.e2e.js | 2 - .../channels/create_public_channel.e2e.js | 4 +- .../e2e/test/channels/direct_messages.e2e.js | 2 - .../test/channels/favorite_channels.e2e.js | 2 - detox/e2e/test/channels/group_messages.e2e.js | 2 - .../test/custom_statuses/custom_status.e2e.js | 2 - .../custom_status_expiry.e2e.js | 1 - .../disable_upload.e2e.js | 2 - .../enable_upload.e2e.js | 2 - .../guest_account/guest_experience.e2e.js | 2 - .../e2e/test/main_sidebar/main_sidebar.e2e.js | 2 - detox/e2e/test/messaging/at_mention.e2e.js | 2 - detox/e2e/test/messaging/channel_link.e2e.js | 2 - .../messaging/emojis_and_reactions.e2e.js | 2 - detox/e2e/test/messaging/hashtags.e2e.js | 2 - detox/e2e/test/messaging/mark_as_read.e2e.js | 4 +- .../e2e/test/messaging/mark_as_unread.e2e.js | 2 - .../messaging/markdown_block_quote.e2e.js | 2 - .../test/messaging/markdown_separator.e2e.js | 2 - .../e2e/test/messaging/markdown_table.e2e.js | 2 - .../test/messaging/message_deletion.e2e.js | 2 - detox/e2e/test/messaging/message_draft.e2e.js | 2 - detox/e2e/test/messaging/message_edit.e2e.js | 2 - .../e2e/test/messaging/message_posting.e2e.js | 1 - detox/e2e/test/messaging/message_reply.e2e.js | 2 - detox/e2e/test/messaging/permalink.e2e.js | 2 - .../e2e/test/messaging/pinned_messages.e2e.js | 2 - .../e2e/test/messaging/recent_mentions.e2e.js | 2 - .../e2e/test/messaging/saved_messages.e2e.js | 2 - detox/e2e/test/messaging/scrolling.e2e.js | 2 - .../tap_send_button_repeatedly.e2e.js | 4 +- ...ping_channel_url_link_joins_channel.e2e.js | 2 - .../channel_notification_default.e2e.js | 2 - .../channel_notification_preference.e2e.js | 2 - .../notifications/in_app_notification.e2e.js | 2 - .../test/notifications/mention_badges.e2e.js | 2 - .../test/signin_authentication/login.e2e.js | 2 - .../select_server.e2e.js | 2 - detox/e2e/test/smoke_test/about.e2e.js | 2 - detox/e2e/test/smoke_test/add_reaction.e2e.js | 2 - .../test/smoke_test/advanced_settings.e2e.js | 2 - .../smoke_test/channel_add_members.e2e.js | 2 - .../smoke_test/channel_manage_members.e2e.js | 2 - detox/e2e/test/smoke_test/channels.e2e.js | 2 - .../e2e/test/smoke_test/clock_display.e2e.js | 1 - .../test/smoke_test/direct_messages.e2e.js | 2 - detox/e2e/test/smoke_test/edit_channel.e2e.js | 2 - .../smoke_test/email_notifications.e2e.js | 4 +- .../test/smoke_test/favorite_channels.e2e.js | 2 - .../e2e/test/smoke_test/group_messages.e2e.js | 2 - .../e2e/test/smoke_test/mention_badges.e2e.js | 2 - .../test/smoke_test/message_deletion.e2e.js | 2 - detox/e2e/test/smoke_test/message_edit.e2e.js | 2 - .../test/smoke_test/message_posting.e2e.js | 1 - .../e2e/test/smoke_test/message_reply.e2e.js | 2 - .../e2e/test/smoke_test/mute_channels.e2e.js | 2 - .../test/smoke_test/private_channels.e2e.js | 2 - .../test/smoke_test/public_channels.e2e.js | 2 - .../test/smoke_test/recent_mentions.e2e.js | 2 - .../e2e/test/smoke_test/saved_messages.e2e.js | 2 - detox/e2e/test/smoke_test/search.e2e.js | 2 - detox/e2e/test/smoke_test/select_team.e2e.js | 2 - detox/e2e/test/smoke_test/teams.e2e.js | 2 - .../test/smoke_test/unread_channels.e2e.js | 2 - detox/e2e/test/smoke_test/user_status.e2e.js | 2 - detox/e2e/test/teams/select_team.e2e.js | 2 - detox/package-lock.json | 6444 +++--- detox/package.json | 26 +- eslint/eslint-mattermost.json | 505 - eslint/eslint-react.json | 123 - fastlane/Gemfile.lock | 6 +- ios/.xcode.env | 10 - ios/Gemfile | 2 +- ios/Gemfile.lock | 31 +- ios/Mattermost.xcodeproj/project.pbxproj | 204 +- .../xcschemes/Mattermost.xcscheme | 2 +- .../{AppDelegate.mm => AppDelegate.m} | 119 +- ios/Mattermost/Info.plist | 4 +- ios/Mattermost/main.m | 3 +- ios/MattermostShare/Info.plist | 4 +- ios/NotificationService/Info.plist | 4 +- ios/Podfile | 34 +- ios/Podfile.lock | 851 +- .../project.pbxproj | 4 +- package-lock.json | 17081 ++++++++-------- package.json | 218 +- ...eact-native-community+netinfo+7.1.9.patch} | 0 ...rstack+rudder-sdk-react-native+1.1.1.patch | 13 + ...rstack+rudder-sdk-react-native+1.5.1.patch | 27 - patches/jail-monkey+2.6.0.patch | 13 + patches/jail-monkey+2.7.0.patch | 21 - patches/react-native+0.67.5.patch | 89 + patches/react-native+0.70.5.patch | 205 - patches/react-native-button+3.0.1.patch | 33 +- ...h => react-native-device-info+8.4.8.patch} | 0 ...h => react-native-fast-image+8.5.11.patch} | 0 ...react-native-haptic-feedback+1.13.0.patch} | 0 patches/react-native-keychain+8.0.0.patch | 62 + patches/react-native-keychain+8.1.1.patch | 169 - patches/react-native-local-auth+1.6.0.patch | 10 +- patches/react-native-navigation+7.25.1.patch | 150 + patches/react-native-navigation+7.30.0.patch | 163 - patches/react-native-reanimated+2.12.0.patch | 70 - patches/react-native-slider+0.11.0.patch | 46 - ....0.patch => react-native-svg+12.1.1.patch} | 16 +- ... => react-native-vector-icons+9.0.0.patch} | 0 patches/react-native-youtube+2.0.2.patch | 31 +- test/setup.js | 5 +- 365 files changed, 20505 insertions(+), 21743 deletions(-) delete mode 100644 android/app/src/main/java/com/mattermost/newarchitecture/MainApplicationReactNativeHost.java delete mode 100644 android/app/src/main/java/com/mattermost/newarchitecture/components/MainComponentsRegistry.java delete mode 100644 android/app/src/main/java/com/mattermost/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java delete mode 100644 android/app/src/main/jni/MainComponentsRegistry.h delete mode 100644 android/app/src/main/jni/OnLoad.cpp delete mode 100644 eslint/eslint-mattermost.json delete mode 100644 eslint/eslint-react.json delete mode 100644 ios/.xcode.env rename ios/Mattermost/{AppDelegate.mm => AppDelegate.m} (66%) rename patches/{@react-native-community+netinfo+9.3.6.patch => @react-native-community+netinfo+7.1.9.patch} (100%) create mode 100644 patches/@rudderstack+rudder-sdk-react-native+1.1.1.patch delete mode 100644 patches/@rudderstack+rudder-sdk-react-native+1.5.1.patch create mode 100644 patches/jail-monkey+2.6.0.patch delete mode 100644 patches/jail-monkey+2.7.0.patch create mode 100644 patches/react-native+0.67.5.patch delete mode 100644 patches/react-native+0.70.5.patch rename patches/{react-native-device-info+10.3.0.patch => react-native-device-info+8.4.8.patch} (100%) rename patches/{react-native-fast-image+8.6.3.patch => react-native-fast-image+8.5.11.patch} (100%) rename patches/{react-native-haptic-feedback+1.14.0.patch => react-native-haptic-feedback+1.13.0.patch} (100%) create mode 100644 patches/react-native-keychain+8.0.0.patch delete mode 100644 patches/react-native-keychain+8.1.1.patch create mode 100644 patches/react-native-navigation+7.25.1.patch delete mode 100644 patches/react-native-navigation+7.30.0.patch delete mode 100644 patches/react-native-reanimated+2.12.0.patch delete mode 100644 patches/react-native-slider+0.11.0.patch rename patches/{react-native-svg+13.5.0.patch => react-native-svg+12.1.1.patch} (69%) rename patches/{react-native-vector-icons+9.2.0.patch => react-native-vector-icons+9.0.0.patch} (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index bd532a2e6..7e9bb5068 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,20 +1,20 @@ version: 2.1 orbs: owasp: entur/owasp@0.0.10 - node: circleci/node@5.0.3 + node: circleci/node@4.5.1 executors: android: parameters: resource_class: - default: xlarge + default: large type: string environment: NODE_OPTIONS: --max_old_space_size=12000 NODE_ENV: production BABEL_ENV: production docker: - - image: cimg/android:2022.09.2-node + - image: circleci/android:api-30-node working_directory: ~/mattermost-mobile resource_class: <> @@ -24,7 +24,7 @@ executors: NODE_ENV: production BABEL_ENV: production macos: - xcode: "14.0.0" + xcode: "13.0.0" working_directory: ~/mattermost-mobile shell: /bin/bash --login -o pipefail @@ -93,7 +93,8 @@ commands: description: "Get JavaScript dependencies" steps: - node/install: - node-version: '16.15.0' + node-version: '16.2.0' + install-npm: false - restore_cache: name: Restore npm cache key: v2-npm-{{ checksum "package.json" }}-{{ arch }} @@ -524,4 +525,4 @@ workflows: tags: only: /^v(\d+\.)(\d+\.)(\d+)(.*)?$/ branches: - only: unsigned + only: unsigned \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 2e8835ccf..4c90e5998 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,13 +1,13 @@ { "extends": [ - "./eslint/eslint-mattermost", - "./eslint/eslint-react", + "plugin:mattermost/react", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended" ], "parser": "@typescript-eslint/parser", "plugins": [ "@typescript-eslint", + "mattermost", "import" ], "settings": { diff --git a/.flowconfig b/.flowconfig index caffacfd4..53ab6fb5c 100644 --- a/.flowconfig +++ b/.flowconfig @@ -11,8 +11,6 @@ node_modules/react-native/Libraries/polyfills/.* ; Flow doesn't support platforms .*/Libraries/Utilities/LoadingView.js -.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$ - [untyped] .*/node_modules/@react-native-community/cli/.*/.* @@ -65,4 +63,4 @@ untyped-import untyped-type-import [version] -^0.182.0 +^0.162.0 diff --git a/.gitignore b/.gitignore index c10d31d96..a9285d81c 100644 --- a/.gitignore +++ b/.gitignore @@ -32,10 +32,8 @@ DerivedData *.apk *.aab *.xcuserstate -ios/.xcode.env.local project.xcworkspace ios/Pods -/vendor/bundle/ .podinstall # Android/IntelliJ @@ -83,11 +81,11 @@ tags # For more information about the recommended setup visit: # https://docs.fastlane.tools/best-practices/source-control/ -**/fastlane/report.xml -**/fastlane/Preview.html -**/fastlane/screenshots -**/fastlane/test_output +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots fastlane/.env +fastlane/report.xml # Sentry android/sentry.properties diff --git a/android/app/build.gradle b/android/app/build.gradle index ef0498e43..5944b2541 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -120,12 +120,9 @@ def jscFlavor = 'org.webkit:android-jsc-intl:+' def enableHermes = project.ext.react.get("enableHermes", false); /** - * Architectures to build native code for. + * Architectures to build native code for in debug. */ -def reactNativeArchitectures() { - def value = project.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] -} +def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures") android { compileSdkVersion rootProject.ext.compileSdkVersion @@ -134,75 +131,11 @@ android { applicationId "com.mattermost.rnbeta" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 435 + versionCode 436 versionName "1.56.0" multiDexEnabled = true testBuildType System.getProperty('testBuildType', 'debug') testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() - - if (isNewArchitectureEnabled()) { - // We configure the CMake build only if you decide to opt-in for the New Architecture. - externalNativeBuild { - cmake { - arguments "-DPROJECT_BUILD_DIR=$buildDir", - "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid", - "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build", - "-DNODE_MODULES_DIR=$rootDir/../node_modules", - "-DANDROID_STL=c++_shared" - // Fix for windows limit on number of character in file paths and in command lines - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - arguments "NDK_APP_SHORT_COMMANDS=true" - } - } - } - if (!enableSeparateBuildPerCPUArchitecture) { - ndk { - abiFilters (*reactNativeArchitectures()) - } - } - } - } - - if (isNewArchitectureEnabled()) { - // We configure the NDK build only if you decide to opt-in for the New Architecture. - externalNativeBuild { - cmake { - path "$projectDir/src/main/jni/CMakeLists.txt" - } - } - def reactAndroidProjectDir = project(':ReactAndroid').projectDir - def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { - dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") - from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") - into("$buildDir/react-ndk/exported") - } - def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { - dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") - from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") - into("$buildDir/react-ndk/exported") - } - afterEvaluate { - // If you wish to add a custom TurboModule or component locally, - // you should uncomment this line. - // preBuild.dependsOn("generateCodegenArtifactsFromSchema") - preDebugBuild.dependsOn(packageReactNdkDebugLibs) - preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) - - // Due to a bug inside AGP, we have to explicitly set a dependency - // between configureCMakeDebug* tasks and the preBuild tasks. - // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 - configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild) - configureCMakeDebug.dependsOn(preDebugBuild) - reactNativeArchitectures().each { architecture -> - tasks.findByName("configureCMakeDebug[${architecture}]")?.configure { - dependsOn("preDebugBuild") - } - tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure { - dependsOn("preReleaseBuild") - } - } - } } signingConfigs { release { @@ -219,25 +152,22 @@ android { reset() enable enableSeparateBuildPerCPUArchitecture universalApk enableSeparateBuildPerCPUArchitecture // If true, also generate a universal APK - include (*reactNativeArchitectures()) + include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } } buildTypes { - def useReleaseKey = project.hasProperty('MATTERMOST_RELEASE_STORE_FILE') release { minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - if (useReleaseKey) { - signingConfig signingConfigs.release - } else { - signingConfig signingConfigs.debug - } + signingConfig signingConfigs.release } debug { - if (useReleaseKey) { - signingConfig signingConfigs.release - } else { - signingConfig signingConfigs.debug + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + if (nativeArchitectures) { + ndk { + abiFilters nativeArchitectures.split(',') + } } } unsigned.initWith(buildTypes.release) @@ -282,6 +212,25 @@ repositories { } } +configurations.all { + resolutionStrategy { + eachDependency { DependencyResolveDetails details -> + if (details.requested.name == 'play-services-base') { + details.useTarget group: details.requested.group, name: details.requested.name, version: '15.0.1' + } + if (details.requested.name == 'play-services-tasks') { + details.useTarget group: details.requested.group, name: details.requested.name, version: '15.0.1' + } + if (details.requested.name == 'play-services-stats') { + details.useTarget group: details.requested.group, name: details.requested.name, version: '15.0.1' + } + if (details.requested.name == 'play-services-basement') { + details.useTarget group: details.requested.group, name: details.requested.name, version: '15.0.1' + } + } + } +} + dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) @@ -301,10 +250,10 @@ dependencies { if (enableHermes) { - //noinspection GradleDynamicVersion - implementation("com.facebook.react:hermes-engine:+") { // From node_modules - exclude group:'com.facebook.fbjni' - } + def hermesPath = "../../node_modules/hermes-engine/android/"; + debugImplementation files(hermesPath + "hermes-debug.aar") + releaseImplementation files(hermesPath + "hermes-release.aar") + unsignedImplementation files(hermesPath + "hermes-release.aar") } else { implementation jscFlavor } @@ -326,39 +275,6 @@ dependencies { androidTestImplementation('com.wix:detox:+') } -configurations.all { - if (isNewArchitectureEnabled()) { - // If new architecture is enabled, we let you build RN from source - // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. - // This will be applied to all the imported transtitive dependency. - resolutionStrategy.dependencySubstitution { - substitute(module("com.facebook.react:react-native")) - .using(project(":ReactAndroid")) - .because("On New Architecture we're building React Native from source") - substitute(module("com.facebook.react:hermes-engine")) - .using(project(":ReactAndroid:hermes-engine")) - .because("On New Architecture we're building Hermes from source") - } - } - - resolutionStrategy { - eachDependency { DependencyResolveDetails details -> - if (details.requested.name == 'play-services-base') { - details.useTarget group: details.requested.group, name: details.requested.name, version: '15.0.1' - } - if (details.requested.name == 'play-services-tasks') { - details.useTarget group: details.requested.group, name: details.requested.name, version: '15.0.1' - } - if (details.requested.name == 'play-services-stats') { - details.useTarget group: details.requested.group, name: details.requested.name, version: '15.0.1' - } - if (details.requested.name == 'play-services-basement') { - details.useTarget group: details.requested.group, name: details.requested.name, version: '15.0.1' - } - } - } -} - // Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { @@ -368,11 +284,3 @@ task copyDownloadableDepsToLibs(type: Copy) { apply plugin: 'com.google.gms.google-services' apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) - -def isNewArchitectureEnabled() { - // To opt-in for the New Architecture, you can either: - // - Set `newArchEnabled` to true inside the `gradle.properties` file - // - Invoke gradle with `-newArchEnabled=true` - // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` - return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" -} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 180b076f5..604a17eef 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -10,4 +10,4 @@ tools:ignore="GoogleAppIndexingWarning"> - + \ No newline at end of file diff --git a/android/app/src/debug/java/com/rn/ReactNativeFlipper.java b/android/app/src/debug/java/com/rn/ReactNativeFlipper.java index 1197406be..f6fb760e5 100644 --- a/android/app/src/debug/java/com/rn/ReactNativeFlipper.java +++ b/android/app/src/debug/java/com/rn/ReactNativeFlipper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) Meta Platforms, Inc. and affiliates. + * Copyright (c) Facebook, Inc. and its affiliates. * *

This source code is licensed under the MIT license found in the LICENSE file in the root * directory of this source tree. @@ -19,7 +19,6 @@ import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; import com.facebook.flipper.plugins.react.ReactFlipperPlugin; import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; -import com.facebook.react.ReactInstanceEventListener; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.ReactContext; import com.facebook.react.modules.network.NetworkingModule; @@ -48,7 +47,7 @@ public class ReactNativeFlipper { ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); if (reactContext == null) { reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceEventListener() { + new ReactInstanceManager.ReactInstanceEventListener() { @Override public void onReactContextInitialized(ReactContext reactContext) { reactInstanceManager.removeReactInstanceEventListener(this); diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 351221352..eda01403a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -95,4 +95,4 @@ - + \ No newline at end of file diff --git a/android/app/src/main/java/com/mattermost/newarchitecture/MainApplicationReactNativeHost.java b/android/app/src/main/java/com/mattermost/newarchitecture/MainApplicationReactNativeHost.java deleted file mode 100644 index 5a5d736bf..000000000 --- a/android/app/src/main/java/com/mattermost/newarchitecture/MainApplicationReactNativeHost.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.mattermost.newarchitecture; - -import android.app.Application; -import androidx.annotation.NonNull; -import com.facebook.react.PackageList; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.ReactPackageTurboModuleManagerDelegate; -import com.facebook.react.bridge.JSIModulePackage; -import com.facebook.react.bridge.JSIModuleProvider; -import com.facebook.react.bridge.JSIModuleSpec; -import com.facebook.react.bridge.JSIModuleType; -import com.facebook.react.bridge.JavaScriptContextHolder; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.UIManager; -import com.facebook.react.fabric.ComponentFactory; -import com.facebook.react.fabric.CoreComponentsRegistry; -import com.facebook.react.fabric.FabricJSIModuleProvider; -import com.facebook.react.fabric.ReactNativeConfig; -import com.facebook.react.uimanager.ViewManagerRegistry; -import com.mattermost.rnbeta.BuildConfig; -import com.mattermost.newarchitecture.components.MainComponentsRegistry; -import com.mattermost.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; -import java.util.ArrayList; -import java.util.List; - -/** - * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both - * TurboModule delegates and the Fabric Renderer. - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -public class MainApplicationReactNativeHost extends ReactNativeHost { - public MainApplicationReactNativeHost(Application application) { - super(application); - } - - @Override - public boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List getPackages() { - List packages = new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - // TurboModules must also be loaded here providing a valid TurboReactPackage implementation: - // packages.add(new TurboReactPackage() { ... }); - // If you have custom Fabric Components, their ViewManagers should also be loaded here - // inside a ReactPackage. - return packages; - } - - @Override - protected String getJSMainModuleName() { - return "index"; - } - - @NonNull - @Override - protected ReactPackageTurboModuleManagerDelegate.Builder - getReactPackageTurboModuleManagerDelegateBuilder() { - // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary - // for the new architecture and to use TurboModules correctly. - return new MainApplicationTurboModuleManagerDelegate.Builder(); - } - - @Override - protected JSIModulePackage getJSIModulePackage() { - return new JSIModulePackage() { - @Override - public List getJSIModules( - final ReactApplicationContext reactApplicationContext, - final JavaScriptContextHolder jsContext) { - final List specs = new ArrayList<>(); - - // Here we provide a new JSIModuleSpec that will be responsible of providing the - // custom Fabric Components. - specs.add( - new JSIModuleSpec() { - @Override - public JSIModuleType getJSIModuleType() { - return JSIModuleType.UIManager; - } - - @Override - public JSIModuleProvider getJSIModuleProvider() { - final ComponentFactory componentFactory = new ComponentFactory(); - CoreComponentsRegistry.register(componentFactory); - - // Here we register a Components Registry. - // The one that is generated with the template contains no components - // and just provides you the one from React Native core. - MainComponentsRegistry.register(componentFactory); - - final ReactInstanceManager reactInstanceManager = getReactInstanceManager(); - - ViewManagerRegistry viewManagerRegistry = - new ViewManagerRegistry( - reactInstanceManager.getOrCreateViewManagers(reactApplicationContext)); - - return new FabricJSIModuleProvider( - reactApplicationContext, - componentFactory, - ReactNativeConfig.DEFAULT_CONFIG, - viewManagerRegistry); - } - }); - return specs; - } - }; - } -} \ No newline at end of file diff --git a/android/app/src/main/java/com/mattermost/newarchitecture/components/MainComponentsRegistry.java b/android/app/src/main/java/com/mattermost/newarchitecture/components/MainComponentsRegistry.java deleted file mode 100644 index 4168988bd..000000000 --- a/android/app/src/main/java/com/mattermost/newarchitecture/components/MainComponentsRegistry.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.mattermost.newarchitecture.components; - -import com.facebook.jni.HybridData; -import com.facebook.proguard.annotations.DoNotStrip; -import com.facebook.react.fabric.ComponentFactory; -import com.facebook.soloader.SoLoader; - -/** - * Class responsible to load the custom Fabric Components. This class has native methods and needs a - * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ - * folder for you). - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -@DoNotStrip -public class MainComponentsRegistry { - static { - SoLoader.loadLibrary("fabricjni"); - } - - @DoNotStrip private final HybridData mHybridData; - - @DoNotStrip - private native HybridData initHybrid(ComponentFactory componentFactory); - - @DoNotStrip - private MainComponentsRegistry(ComponentFactory componentFactory) { - mHybridData = initHybrid(componentFactory); - } - - @DoNotStrip - public static MainComponentsRegistry register(ComponentFactory componentFactory) { - return new MainComponentsRegistry(componentFactory); - } -} \ No newline at end of file diff --git a/android/app/src/main/java/com/mattermost/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java b/android/app/src/main/java/com/mattermost/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java deleted file mode 100644 index a5e317674..000000000 --- a/android/app/src/main/java/com/mattermost/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.mattermost.newarchitecture.modules; - -import com.facebook.jni.HybridData; -import com.facebook.react.ReactPackage; -import com.facebook.react.ReactPackageTurboModuleManagerDelegate; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.soloader.SoLoader; -import java.util.List; - -/** - * Class responsible to load the TurboModules. This class has native methods and needs a - * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ - * folder for you). - * - *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the - * `newArchEnabled` property). Is ignored otherwise. - */ -public class MainApplicationTurboModuleManagerDelegate - extends ReactPackageTurboModuleManagerDelegate { - - private static volatile boolean sIsSoLibraryLoaded; - - protected MainApplicationTurboModuleManagerDelegate( - ReactApplicationContext reactApplicationContext, List packages) { - super(reactApplicationContext, packages); - } - - protected native HybridData initHybrid(); - - native boolean canCreateTurboModule(String moduleName); - - public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder { - protected MainApplicationTurboModuleManagerDelegate build( - ReactApplicationContext context, List packages) { - return new MainApplicationTurboModuleManagerDelegate(context, packages); - } - } - - @Override - protected synchronized void maybeLoadOtherSoLibraries() { - if (!sIsSoLibraryLoaded) { - // If you change the name of your application .so file in the Android.mk file, - // make sure you update the name here as well. - SoLoader.loadLibrary("rndiffapp_appmodules"); - sIsSoLibraryLoaded = true; - } - } -} \ No newline at end of file diff --git a/android/app/src/main/java/com/mattermost/rnbeta/MainActivity.java b/android/app/src/main/java/com/mattermost/rnbeta/MainActivity.java index fe1b6fc4c..537e76fcc 100644 --- a/android/app/src/main/java/com/mattermost/rnbeta/MainActivity.java +++ b/android/app/src/main/java/com/mattermost/rnbeta/MainActivity.java @@ -1,44 +1,18 @@ package com.mattermost.rnbeta; import android.os.Bundle; -import androidx.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.KeyEvent; import android.content.res.Configuration; -import com.facebook.react.bridge.Arguments; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactMethod; -import com.facebook.react.bridge.WritableMap; -import com.facebook.react.ReactActivityDelegate; -import com.facebook.react.ReactRootView; import com.reactnativenavigation.NavigationActivity; import com.github.emilioicai.hwkeyboardevent.HWKeyboardEventModule; public class MainActivity extends NavigationActivity { private boolean HWKeyboardConnected = false; - public static class MainActivityDelegate extends ReactActivityDelegate { - public MainActivityDelegate(NavigationActivity activity, String mainComponentName) { - super(activity, mainComponentName); - } - - @Override - protected ReactRootView createRootView() { - ReactRootView reactRootView = new ReactRootView(getContext()); - // If you opted-in for the New Architecture, we enable the Fabric Renderer. - reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED); - return reactRootView; - } - - @Override - protected boolean isConcurrentRootEnabled() { - // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18). - // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html - return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; - } - } - @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -47,7 +21,7 @@ public class MainActivity extends NavigationActivity { } @Override - public void onConfigurationChanged(Configuration newConfig) { + public void onConfigurationChanged(@NonNull Configuration newConfig) { super.onConfigurationChanged(newConfig); if (newConfig.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO) { @@ -57,12 +31,6 @@ public class MainActivity extends NavigationActivity { } } - @Override - public void onWindowFocusChanged(boolean hasFocus) { - super.onWindowFocusChanged(hasFocus); - getReactGateway().onWindowFocusChanged(hasFocus); - } - /* https://mattermost.atlassian.net/browse/MM-10601 Required by react-native-hw-keyboard-event @@ -70,24 +38,15 @@ public class MainActivity extends NavigationActivity { */ @Override public boolean dispatchKeyEvent(KeyEvent event) { - if (HWKeyboardConnected) { - int keyCode = event.getKeyCode(); - int keyAction = event.getAction(); - if (keyAction == KeyEvent.ACTION_UP) { - if (keyCode == KeyEvent.KEYCODE_ENTER) { - String keyPressed = event.isShiftPressed() ? "shift-enter" : "enter"; - HWKeyboardEventModule.getInstance().keyPressed(keyPressed); - return true; - } else if (keyCode == KeyEvent.KEYCODE_K && event.isCtrlPressed()) { - HWKeyboardEventModule.getInstance().keyPressed("find-channels"); - return true; - } - } + if (HWKeyboardConnected && event.getKeyCode() == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) { + String keyPressed = event.isShiftPressed() ? "shift-enter" : "enter"; + HWKeyboardEventModule.getInstance().keyPressed(keyPressed); + return true; } return super.dispatchKeyEvent(event); - }; + } private void setHWKeyboardConnected() { HWKeyboardConnected = getResources().getConfiguration().keyboard == Configuration.KEYBOARD_QWERTY; } -} \ No newline at end of file +} diff --git a/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java b/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java index 088af821d..9316646dd 100644 --- a/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java +++ b/android/app/src/main/java/com/mattermost/rnbeta/MainApplication.java @@ -25,19 +25,16 @@ import com.wix.reactnativenotifications.core.JsIOHelper; import com.facebook.react.PackageList; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactPackage; -import com.facebook.react.config.ReactFeatureFlags; import com.facebook.react.ReactNativeHost; import com.facebook.react.TurboReactPackage; -import com.facebook.react.bridge.JSIModulePackage; import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.module.model.ReactModuleInfo; import com.facebook.react.module.model.ReactModuleInfoProvider; import com.facebook.soloader.SoLoader; -import com.facebook.react.config.ReactFeatureFlags; -import com.mattermost.newarchitecture.MainApplicationReactNativeHost; +import com.facebook.react.bridge.JSIModulePackage; public class MainApplication extends NavigationApplication implements INotificationsApplication, INotificationsDrawerApplication { @@ -47,75 +44,68 @@ public class MainApplication extends NavigationApplication implements INotificat private Bundle mManagedConfig = null; - private final ReactNativeHost mReactNativeHost = - new ReactNativeHost(this) { - @Override - public boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } +private final ReactNativeHost mReactNativeHost = + new ReactNativeHost(this) { + @Override + public boolean getUseDeveloperSupport() { + return BuildConfig.DEBUG; + } - @Override - protected List getPackages() { - List packages = new PackageList(this).getPackages(); - // Packages that cannot be auto linked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - packages.add(new RNNotificationsPackage(MainApplication.this)); - packages.add( - new TurboReactPackage() { - @Override - public NativeModule getModule(String name, ReactApplicationContext reactContext) { - switch (name) { - case "MattermostManaged": - return MattermostManagedModule.getInstance(reactContext); - case "MattermostShare": - return new ShareModule(instance, reactContext); - case "NotificationPreferences": - return NotificationPreferencesModule.getInstance(instance, reactContext); - case "RNTextInputReset": - return new RNTextInputResetModule(reactContext); - default: - throw new IllegalArgumentException("Could not find module " + name); - } - } - - @Override - public ReactModuleInfoProvider getReactModuleInfoProvider() { - return () -> { - Map map = new HashMap<>(); - map.put("MattermostManaged", new ReactModuleInfo("MattermostManaged", "com.mattermost.rnbeta.MattermostManagedModule", false, false, false, false, false)); - map.put("MattermostShare", new ReactModuleInfo("MattermostShare", "com.mattermost.share.ShareModule", false, false, true, false, false)); - map.put("NotificationPreferences", new ReactModuleInfo("NotificationPreferences", "com.mattermost.rnbeta.NotificationPreferencesModule", false, false, false, false, false)); - map.put("RNTextInputReset", new ReactModuleInfo("RNTextInputReset", "com.mattermost.rnbeta.RNTextInputResetModule", false, false, false, false, false)); - return map; - }; + @Override + protected List getPackages() { + List packages = new PackageList(this).getPackages(); + // Packages that cannot be auto linked yet can be added manually here, for example: + // packages.add(new MyReactNativePackage()); + packages.add(new RNNotificationsPackage(MainApplication.this)); + packages.add( + new TurboReactPackage() { + @Override + public NativeModule getModule(String name, ReactApplicationContext reactContext) { + switch (name) { + case "MattermostManaged": + return MattermostManagedModule.getInstance(reactContext); + case "MattermostShare": + return new ShareModule(instance, reactContext); + case "NotificationPreferences": + return NotificationPreferencesModule.getInstance(instance, reactContext); + case "RNTextInputReset": + return new RNTextInputResetModule(reactContext); + default: + throw new IllegalArgumentException("Could not find module " + name); } } - ); - return packages; - } + @Override + public ReactModuleInfoProvider getReactModuleInfoProvider() { + return () -> { + Map map = new HashMap<>(); + map.put("MattermostManaged", new ReactModuleInfo("MattermostManaged", "com.mattermost.rnbeta.MattermostManagedModule", false, false, false, false, false)); + map.put("MattermostShare", new ReactModuleInfo("MattermostShare", "com.mattermost.share.ShareModule", false, false, true, false, false)); + map.put("NotificationPreferences", new ReactModuleInfo("NotificationPreferences", "com.mattermost.rnbeta.NotificationPreferencesModule", false, false, false, false, false)); + map.put("RNTextInputReset", new ReactModuleInfo("RNTextInputReset", "com.mattermost.rnbeta.RNTextInputResetModule", false, false, false, false, false)); + return map; + }; + } + } + ); - @Override - protected String getJSMainModuleName() { - return "index"; - } + return packages; + } - @Override - protected JSIModulePackage getJSIModulePackage() { - return (JSIModulePackage) new CustomMMKVJSIModulePackage(); - } + @Override + protected String getJSMainModuleName() { + return "index"; + } + + @Override + protected JSIModulePackage getJSIModulePackage() { + return (JSIModulePackage) new CustomMMKVJSIModulePackage(); + } }; - private final ReactNativeHost mNewArchitectureNativeHost = - new MainApplicationReactNativeHost(this); - @Override public ReactNativeHost getReactNativeHost() { - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - return mNewArchitectureNativeHost; - } else { - return mReactNativeHost; - } + return mReactNativeHost; } @Override @@ -128,8 +118,6 @@ public class MainApplication extends NavigationApplication implements INotificat RealPathUtil.deleteTempFiles(tempFolder); Log.i("ReactNative", "Cleaning temp cache " + tempFolder.getAbsolutePath()); - // If you opted-in for the New Architecture, we enable the TurboModule system - ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } diff --git a/android/app/src/main/jni/MainComponentsRegistry.h b/android/app/src/main/jni/MainComponentsRegistry.h deleted file mode 100644 index 07af8980b..000000000 --- a/android/app/src/main/jni/MainComponentsRegistry.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -namespace facebook { -namespace react { - -class MainComponentsRegistry - : public facebook::jni::HybridClass { - public: - // Adapt it to the package you used for your Java class. - constexpr static auto kJavaDescriptor = - "Lcom/mattermost/newarchitecture/components/MainComponentsRegistry;"; - - static void registerNatives(); - - MainComponentsRegistry(ComponentFactory *delegate); - - private: - static std::shared_ptr - sharedProviderRegistry(); - - static jni::local_ref initHybrid( - jni::alias_ref, - ComponentFactory *delegate); -}; - -} // namespace react -} // namespace facebook \ No newline at end of file diff --git a/android/app/src/main/jni/OnLoad.cpp b/android/app/src/main/jni/OnLoad.cpp deleted file mode 100644 index ae1ef007d..000000000 --- a/android/app/src/main/jni/OnLoad.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include "MainApplicationTurboModuleManagerDelegate.h" -#include "MainComponentsRegistry.h" - -JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { - return facebook::jni::initialize(vm, [] { - facebook::react::MainApplicationTurboModuleManagerDelegate:: - registerNatives(); - facebook::react::MainComponentsRegistry::registerNatives(); - }); -} \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 274ddf0a2..4753306cd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -10,13 +10,8 @@ buildscript { kotlinVersion = "1.5.30" firebaseVersion = "21.0.0" RNNKotlinVersion = kotlinVersion - if (System.properties['os.arch'] == "aarch64") { - // For M1 Users we need to use the NDK 24 which added support for aarch64 - ndkVersion = "24.0.8215888" - } else { - // Otherwise we default to the side-by-side NDK version from AGP. - ndkVersion = "21.4.7075529" - } + ndkVersion = "21.4.7075529" + } repositories { google() @@ -24,9 +19,7 @@ buildscript { mavenLocal() } dependencies { - classpath 'com.android.tools.build:gradle:7.2.1' - classpath("com.facebook.react:react-native-gradle-plugin") - classpath("de.undercouch:gradle-download-task:5.0.1") + classpath 'com.android.tools.build:gradle:4.2.2' classpath 'com.google.gms:google-services:4.3.10' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" diff --git a/android/gradle.properties b/android/gradle.properties index 7b404d8c1..5bcc2744f 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -29,15 +29,4 @@ android.useAndroidX=true android.enableJetifier=true # Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.125.0 - -# Use this property to specify which architecture you want to build. -# You can also override it from the CLI using -# ./gradlew -PreactNativeArchitectures=x86_64 -reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 -# Use this property to enable support to the new architecture. -# This will allow you to use TurboModules and the Fabric render in -# your application. You should enable this flag either if you want -# to write custom TurboModules/Fabric components OR use libraries that -# are providing them. -newArchEnabled=false \ No newline at end of file +FLIPPER_VERSION=0.99.0 diff --git a/android/settings.gradle b/android/settings.gradle index dc0b28055..9369160c6 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -3,10 +3,3 @@ include ':reactnativenotifications' project(':reactnativenotifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/lib/android/app') apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' -includeBuild('../node_modules/react-native-gradle-plugin') -if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { - include(":ReactAndroid") - project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid') - include(":ReactAndroid:hermes-engine") - project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine') -} \ No newline at end of file diff --git a/app/components/__snapshots__/badge.test.js.snap b/app/components/__snapshots__/badge.test.js.snap index efa6975da..bf77c93db 100644 --- a/app/components/__snapshots__/badge.test.js.snap +++ b/app/components/__snapshots__/badge.test.js.snap @@ -3,14 +3,14 @@ exports[`Badge should match snapshot 1`] = ` `; diff --git a/app/components/__snapshots__/swiper.test.js.snap b/app/components/__snapshots__/swiper.test.js.snap index 7cdb8e044..9545911fb 100644 --- a/app/components/__snapshots__/swiper.test.js.snap +++ b/app/components/__snapshots__/swiper.test.js.snap @@ -4,8 +4,8 @@ exports[`Swiper should match snapshot 1`] = ` @John.Smith @@ -21,18 +21,18 @@ exports[`AtMention should match snapshot, with highlight 1`] = ` onLongPress={[Function]} onPress={[Function]} style={ - { + Object { "backgroundColor": "yellow", } } > { iconColor: { tintColor: theme.centerChannelColor, }, - iconSize: { - width: 10, - height: 16, - }, container: { flexDirection: 'row', alignItems: 'center', @@ -104,14 +100,18 @@ const SlashSuggestionItem = (props: Props) => { let image = ( ); if (props.icon === COMMAND_SUGGESTION_ERROR) { image = ( ); diff --git a/app/components/autocomplete_selector/autocomplete_selector.tsx b/app/components/autocomplete_selector/autocomplete_selector.tsx index 5300bb787..08283494f 100644 --- a/app/components/autocomplete_selector/autocomplete_selector.tsx +++ b/app/components/autocomplete_selector/autocomplete_selector.tsx @@ -204,7 +204,6 @@ export default class AutocompleteSelector extends PureComponent { goToSelectorScreen = preventDoubleTap(async () => { const closeButton = await CompassIcon.getImageSource(Platform.select({ios: 'arrow-back-ios', default: 'arrow-left'}), 24, this.props.theme.sidebarHeaderTextColor); - // @ts-expect-error context type definition const {formatMessage} = this.context.intl; const {actions, dataSource, options, placeholder, getDynamicOptions, theme} = this.props; const screen = 'SelectorScreen'; @@ -234,7 +233,6 @@ export default class AutocompleteSelector extends PureComponent { }); render() { - // @ts-expect-error context type definition const {intl} = this.context; const { placeholder, diff --git a/app/components/avatars/__snapshots__/avatars.test.tsx.snap b/app/components/avatars/__snapshots__/avatars.test.tsx.snap index d63045143..585590876 100644 --- a/app/components/avatars/__snapshots__/avatars.test.tsx.snap +++ b/app/components/avatars/__snapshots__/avatars.test.tsx.snap @@ -7,14 +7,14 @@ exports[`Avatars should match snapshot for overflow 1`] = ` > `; exports[`CustomList should match snapshot, renderSectionHeader 1`] = ` - + `; diff --git a/app/components/emoji_picker/__snapshots__/emoji_picker.test.js.snap b/app/components/emoji_picker/__snapshots__/emoji_picker.test.js.snap index c018dab55..f159da5c4 100644 --- a/app/components/emoji_picker/__snapshots__/emoji_picker.test.js.snap +++ b/app/components/emoji_picker/__snapshots__/emoji_picker.test.js.snap @@ -1,15 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`components/emoji_picker/emoji_picker.ios should match snapshot 1`] = ` - - + `; diff --git a/app/components/error_text/__snapshots__/error_text.test.js.snap b/app/components/error_text/__snapshots__/error_text.test.js.snap index 2dbb436db..4171a0af9 100644 --- a/app/components/error_text/__snapshots__/error_text.test.js.snap +++ b/app/components/error_text/__snapshots__/error_text.test.js.snap @@ -3,18 +3,18 @@ exports[`ErrorText should match snapshot 1`] = ` item, []); + const keyExtractor = React.useCallback((item) => item, []); - const renderPost = React.useCallback(({item}: ListRenderItemInfo) => { + const renderPost = React.useCallback(({item}) => { return ( @@ -40,7 +40,7 @@ exports[`Global Thread List Header Should render threads with functional tabs & > diff --git a/app/components/markdown/transform.test.js b/app/components/markdown/transform.test.js index 80189a680..fdedab7a9 100644 --- a/app/components/markdown/transform.test.js +++ b/app/components/markdown/transform.test.js @@ -3100,6 +3100,50 @@ function nodeToString(node) { return out; } +const ignoredKeys = {_sourcepos: true, _lastLineBlank: true, _open: true, _string_content: true, _info: true, _isFenced: true, _fenceChar: true, _fenceLength: true, _fenceOffset: true, _onEnter: true, _onExit: true}; +function astToJson(node, visited = [], indent = '') { + let out = '{'; + + const myVisited = [...visited]; + myVisited.push(node); + + const keys = Object.keys(node).filter((key) => !ignoredKeys[key]); + if (keys.length > 0) { + out += '\n'; + } + + for (const [i, key] of keys.entries()) { + out += indent + ' "' + key + '":'; + + const value = node[key]; + if (myVisited.indexOf(value) !== -1) { + out += '[Circular]'; + } else if (value === null) { + out += 'null'; + } else if (typeof value === 'number') { + out += value; + } else if (typeof value === 'string') { + out += '"' + value + '"'; + } else if (typeof value === 'boolean') { + out += String(value); + } else if (typeof value === 'object') { + out += astToJson(value, myVisited, indent + ' '); // eslint-disable-line @typescript-eslint/no-unused-vars + } + + if (i !== keys.length - 1) { + out += ',\n'; + } + } + + if (keys.length > 0) { + out += '\n' + indent; + } + + out += '}'; + + return out; +} + // Converts an AST represented as a JavaScript object into a full Commonmark-compatitle AST. // This function is intended for use while testing. An example of input would be: // { diff --git a/app/components/post_draft/__snapshots__/post_draft.test.js.snap b/app/components/post_draft/__snapshots__/post_draft.test.js.snap index e8056f863..b2fce7be7 100644 --- a/app/components/post_draft/__snapshots__/post_draft.test.js.snap +++ b/app/components/post_draft/__snapshots__/post_draft.test.js.snap @@ -3,7 +3,7 @@ exports[`PostDraft Should render the Archived for channelIsArchived 1`] = ` - + `; diff --git a/app/components/post_draft/send_action/__snapshots__/send.test.js.snap b/app/components/post_draft/send_action/__snapshots__/send.test.js.snap index 069592290..d940e01e0 100644 --- a/app/components/post_draft/send_action/__snapshots__/send.test.js.snap +++ b/app/components/post_draft/send_action/__snapshots__/send.test.js.snap @@ -3,7 +3,7 @@ exports[`SendAction should change theme backgroundColor to 0.3 opacity 1`] = ` { const {unreadCount} = this.props; - - // @ts-expect-error context type definition const {formatMessage} = this.context.intl; const isInitialMessage = unreadCount === count; diff --git a/app/components/post_list/post/body/content/message_attachments/__snapshots__/attachment_footer.test.tsx.snap b/app/components/post_list/post/body/content/message_attachments/__snapshots__/attachment_footer.test.tsx.snap index b30051ee7..bee08d2fe 100644 --- a/app/components/post_list/post/body/content/message_attachments/__snapshots__/attachment_footer.test.tsx.snap +++ b/app/components/post_list/post/body/content/message_attachments/__snapshots__/attachment_footer.test.tsx.snap @@ -3,7 +3,7 @@ exports[`AttachmentFooter it matches snapshot when both footer and footer_icon are provided 1`] = ` @username @username @username @other.user @username. @@ -233,8 +233,8 @@ exports[`renderSystemMessage uses renderer for Guest added and join to channel 2 exports[`renderSystemMessage uses renderer for OLD archived channel without a username 1`] = ` @username @username { + const registerViewableItemsListener = useCallback((listener) => { onViewableItemsChangedListener.current = listener; const removeListener = () => { onViewableItemsChangedListener.current = undefined; @@ -113,7 +113,7 @@ const PostList = ({ return removeListener; }, []); - const registerScrollEndIndexListener = useCallback((listener: any) => { + const registerScrollEndIndexListener = useCallback((listener) => { onScrollEndIndexListener.current = listener; const removeListener = () => { onScrollEndIndexListener.current = undefined; @@ -122,7 +122,7 @@ const PostList = ({ return removeListener; }, []); - const keyExtractor = useCallback((item: string) => { + const keyExtractor = useCallback((item) => { // All keys are strings (either post IDs or special keys) return item; }, []); @@ -173,7 +173,7 @@ const PostList = ({ } }, []); - const renderItem = useCallback(({item, index}: ListRenderItemInfo) => { + const renderItem = useCallback(({item, index}) => { if (isStartOfNewMessages(item)) { // postIds includes a date item after the new message indicator so 2 // needs to be added to the index for the length check to be correct. diff --git a/app/components/progressive_image/__snapshots__/progressive_image.test.js.snap b/app/components/progressive_image/__snapshots__/progressive_image.test.js.snap index c22f90784..1ca1fdf6b 100644 --- a/app/components/progressive_image/__snapshots__/progressive_image.test.js.snap +++ b/app/components/progressive_image/__snapshots__/progressive_image.test.js.snap @@ -3,26 +3,26 @@ exports[`ProgressiveImage should match snapshot for BackgroundImage 1`] = ` @@ -56,8 +56,8 @@ exports[`ProgressiveImage should match snapshot for Default Image 1`] = ` resizeMode="contain" source="https://images.com/image.png" style={ - [ - { + Array [ + Object { "bottom": 0, "left": 0, "position": "absolute", @@ -75,14 +75,14 @@ exports[`ProgressiveImage should match snapshot for Default Image 1`] = ` exports[`ProgressiveImage should match snapshot for Image 1`] = ` } containerStyle={ - { + Object { "backgroundColor": "#ffffff", "flex": 1, "paddingBottom": 0, @@ -73,14 +73,14 @@ exports[`SearchBar should match snapshot 1`] = ` editable={true} enablesReturnKeyAutomatically={true} inputContainerStyle={ - { + Object { "backgroundColor": undefined, "borderRadius": 2, "height": 10, } } inputStyle={ - { + Object { "backgroundColor": "transparent", "color": "#fff", "fontSize": 14, @@ -93,7 +93,7 @@ exports[`SearchBar should match snapshot 1`] = ` keyboardAppearance="keyboard-appearance" keyboardType="keyboard-type" leftIconContainerStyle={ - { + Object { "marginLeft": 4, "width": 30, } @@ -114,11 +114,11 @@ exports[`SearchBar should match snapshot 1`] = ` name="magnify" size={24} style={ - [ - { + Array [ + Object { "flex": 1, }, - { + Object { "color": "#bbbbbb", "top": 8, }, diff --git a/app/components/sidebars/main/__snapshots__/main_sidebar.test.js.snap b/app/components/sidebars/main/__snapshots__/main_sidebar.test.js.snap index 40c1c0015..d955b64b8 100644 --- a/app/components/sidebars/main/__snapshots__/main_sidebar.test.js.snap +++ b/app/components/sidebars/main/__snapshots__/main_sidebar.test.js.snap @@ -4,7 +4,7 @@ exports[`MainSidebar should match, full snapshot 1`] = ` diff --git a/app/components/sidebars/settings/__snapshots__/settings_sidebar.test.js.snap b/app/components/sidebars/settings/__snapshots__/settings_sidebar.test.js.snap index eac01aae4..f56a457a1 100644 --- a/app/components/sidebars/settings/__snapshots__/settings_sidebar.test.js.snap +++ b/app/components/sidebars/settings/__snapshots__/settings_sidebar.test.js.snap @@ -5,7 +5,7 @@ exports[`SettingsSidebar Custom Status should close sidebar when update custom s drawerPosition="right" drawerWidth={710} forwardRef={ - { + Object { "current": null, } } @@ -21,7 +21,7 @@ exports[`SettingsSidebar Custom Status should keep sidebar open when update cust drawerPosition="right" drawerWidth={710} forwardRef={ - { + Object { "current": null, } } @@ -37,7 +37,7 @@ exports[`SettingsSidebar should match snapshot 1`] = ` drawerPosition="right" drawerWidth={710} forwardRef={ - { + Object { "current": null, } } @@ -53,7 +53,7 @@ exports[`SettingsSidebar should match snapshot with custom status enabled 1`] = drawerPosition="right" drawerWidth={710} forwardRef={ - { + Object { "current": null, } } @@ -69,7 +69,7 @@ exports[`SettingsSidebar should match snapshot with custom status expiry 1`] = ` drawerPosition="right" drawerWidth={710} forwardRef={ - { + Object { "current": null, } } diff --git a/app/components/slide_up_panel/__snapshots__/slide_up_panel_indicator.test.js.snap b/app/components/slide_up_panel/__snapshots__/slide_up_panel_indicator.test.js.snap index 253701c84..e2e49dd9b 100644 --- a/app/components/slide_up_panel/__snapshots__/slide_up_panel_indicator.test.js.snap +++ b/app/components/slide_up_panel/__snapshots__/slide_up_panel_indicator.test.js.snap @@ -3,7 +3,7 @@ exports[`SlideUpPanelIndicator should match snapshot 1`] = ` 00:15 diff --git a/app/products/calls/components/__snapshots__/floating_call_container.test.js.snap b/app/products/calls/components/__snapshots__/floating_call_container.test.js.snap index ca28a87f8..31e9b18d9 100644 --- a/app/products/calls/components/__snapshots__/floating_call_container.test.js.snap +++ b/app/products/calls/components/__snapshots__/floating_call_container.test.js.snap @@ -4,8 +4,8 @@ exports[`FloatingCallContainer should match snapshot 1`] = ` { diff --git a/app/products/calls/components/join_call/__snapshots__/join_call.test.js.snap b/app/products/calls/components/join_call/__snapshots__/join_call.test.js.snap index a79cab84c..4df265679 100644 --- a/app/products/calls/components/join_call/__snapshots__/join_call.test.js.snap +++ b/app/products/calls/components/join_call/__snapshots__/join_call.test.js.snap @@ -3,7 +3,7 @@ exports[`JoinCall should match snapshot 1`] = ` } userIds={ - [ + Array [ "user-1-id", "user-2-id", ] diff --git a/app/products/calls/hooks.ts b/app/products/calls/hooks.ts index 4b09d545c..d6911a7e1 100644 --- a/app/products/calls/hooks.ts +++ b/app/products/calls/hooks.ts @@ -57,7 +57,6 @@ export const useCallsChannelSettings = () => { useEffect(() => { if (pluginEnabled) { - // @ts-expect-error ActionFunc dispatch(loadConfig()); } }, []); diff --git a/app/products/calls/screens/call/__snapshots__/call_screen.test.js.snap b/app/products/calls/screens/call/__snapshots__/call_screen.test.js.snap index 0e8bafcf5..4bc3e1d4b 100644 --- a/app/products/calls/screens/call/__snapshots__/call_screen.test.js.snap +++ b/app/products/calls/screens/call/__snapshots__/call_screen.test.js.snap @@ -1,16 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`CallScreen Landscape should match snapshot 1`] = ` - - + `; exports[`CallScreen Landscape should match snapshot with screenshare 1`] = ` - - + `; exports[`CallScreen Portrait should match snapshot 1`] = ` - - + `; exports[`CallScreen Portrait should match snapshot with screenshare 1`] = ` - - + `; exports[`CallScreen should show controls in landscape view on click the screen share 1`] = ` - - + `; exports[`CallScreen should show controls in landscape view on click the users list 1`] = ` - - + `; diff --git a/app/products/calls/screens/call_other_actions/__snapshots__/action.test.js.snap b/app/products/calls/screens/call_other_actions/__snapshots__/action.test.js.snap index ba7dd1d9b..ab6765fe7 100644 --- a/app/products/calls/screens/call_other_actions/__snapshots__/action.test.js.snap +++ b/app/products/calls/screens/call_other_actions/__snapshots__/action.test.js.snap @@ -3,7 +3,7 @@ exports[`Action should match snapshot 1`] = `