From 58b72302d60fb9e2a09dd23178b62e5517c2366f Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Fri, 23 Feb 2018 09:06:02 -0500 Subject: [PATCH] update eslint's `comma-dangle` rule to `always-multiline` (#1457) * update eslint's `comma-dangle` rule to `always-multiline` * add check and fix scripts to package.json * Invoke `yarn fix` to adopt the updated eslint rules. No other changes are included. --- .eslintrc.json | 2 +- Makefile | 2 +- app/actions/device/index.js | 14 +- app/actions/views/account_notifications.js | 2 +- app/actions/views/announcement.js | 2 +- app/actions/views/channel.js | 48 +- app/actions/views/client_upgrade.js | 2 +- app/actions/views/command.js | 2 +- app/actions/views/create_channel.js | 2 +- app/actions/views/emoji.js | 4 +- app/actions/views/file_preview.js | 2 +- app/actions/views/file_upload.js | 18 +- app/actions/views/login.js | 10 +- app/actions/views/root.js | 16 +- app/actions/views/search.js | 2 +- app/actions/views/select_server.js | 4 +- app/actions/views/select_team.js | 4 +- app/actions/views/thread.js | 4 +- .../announcement_banner.js | 28 +- app/components/announcement_banner/index.js | 6 +- app/components/app_icon.js | 4 +- app/components/at_mention/at_mention.js | 22 +- app/components/at_mention/index.js | 2 +- app/components/attachment_button.js | 70 +- .../autocomplete/at_mention/at_mention.js | 34 +- .../autocomplete/at_mention/index.js | 8 +- .../at_mention_item/at_mention_item.js | 16 +- .../autocomplete/at_mention_item/index.js | 2 +- app/components/autocomplete/autocomplete.js | 30 +- .../autocomplete_divider.js | 6 +- .../autocomplete_divider/index.js | 2 +- .../autocomplete_section_header.js | 10 +- .../channel_mention/channel_mention.js | 26 +- .../autocomplete/channel_mention/index.js | 8 +- .../channel_mention_item.js | 14 +- .../channel_mention_item/index.js | 2 +- .../emoji_suggestion/emoji_suggestion.js | 26 +- .../autocomplete/emoji_suggestion/index.js | 8 +- app/components/autocomplete/index.js | 2 +- .../autocomplete/slash_suggestion/index.js | 6 +- .../slash_suggestion/slash_suggestion.js | 26 +- .../slash_suggestion/slash_suggestion_item.js | 18 +- .../autocomplete/special_mention_item.js | 20 +- app/components/badge.js | 20 +- app/components/button.js | 8 +- .../channel_drawer/channel_drawer.js | 42 +- .../channel_item/channel_item.js | 36 +- .../channels_list/channel_item/index.js | 2 +- .../channels_list/channels_list.js | 52 +- .../filtered_list/filtered_list.js | 34 +- .../channels_list/filtered_list/index.js | 12 +- .../channel_drawer/channels_list/index.js | 2 +- .../channels_list/list/index.js | 4 +- .../channel_drawer/channels_list/list/list.js | 48 +- .../switch_teams_button/index.js | 2 +- .../switch_teams_button.js | 18 +- .../channels_list/unread_indicator/index.js | 14 +- .../drawer_swipper/drawer_swiper.js | 10 +- .../channel_drawer/drawer_swipper/index.js | 2 +- app/components/channel_drawer/index.js | 6 +- .../channel_drawer/teams_list/index.js | 6 +- .../channel_drawer/teams_list/teams_list.js | 44 +- .../teams_list/teams_list_item/index.js | 2 +- .../teams_list_item/teams_list_item.js | 30 +- app/components/channel_icon.js | 38 +- app/components/channel_intro/channel_intro.js | 80 +- app/components/channel_intro/index.js | 2 +- app/components/channel_link/channel_link.js | 8 +- app/components/channel_link/index.js | 6 +- .../channel_loader/channel_loader.js | 28 +- app/components/channel_loader/index.js | 2 +- app/components/checkmark.js | 2 +- .../client_upgrade_listener.js | 42 +- .../client_upgrade_listener/index.js | 6 +- app/components/conditional_touchable.js | 2 +- .../channel_list_row/channel_list_row.js | 16 +- .../custom_list/channel_list_row/index.js | 2 +- app/components/custom_list/custom_list_row.js | 20 +- app/components/custom_list/index.js | 40 +- .../custom_list/user_list_row/index.js | 2 +- .../user_list_row/user_list_row.js | 30 +- app/components/custom_section_list.js | 40 +- app/components/drawer.js | 2 +- app/components/edit_channel_info/index.js | 36 +- app/components/emoji/emoji.js | 18 +- app/components/emoji/index.js | 2 +- app/components/emoji_picker/emoji_picker.js | 86 +- .../emoji_picker/emoji_picker_row.js | 18 +- app/components/emoji_picker/index.js | 40 +- app/components/error_list/error_list.js | 18 +- app/components/error_list/general_error.js | 14 +- app/components/error_list/index.js | 6 +- app/components/error_text.js | 8 +- .../file_attachment_list/file_attachment.js | 24 +- .../file_attachment_document.js | 44 +- .../file_attachment_icon.js | 12 +- .../file_attachment_image.js | 30 +- .../file_attachment_list.js | 10 +- app/components/file_attachment_list/index.js | 6 +- .../file_upload_preview.js | 38 +- app/components/file_upload_preview/index.js | 6 +- app/components/flag_icon.js | 2 +- app/components/formatted_date.js | 2 +- app/components/formatted_text.js | 4 +- app/components/formatted_time.js | 2 +- .../layout/keyboard_layout/index.js | 2 +- .../layout/keyboard_layout/keyboard_layout.js | 16 +- app/components/loading.js | 12 +- app/components/markdown/index.js | 2 +- app/components/markdown/markdown.js | 26 +- .../markdown/markdown_block_quote.js | 12 +- .../markdown/markdown_code_block/index.js | 2 +- .../markdown_code_block.js | 46 +- .../markdown/markdown_image/index.js | 2 +- .../markdown/markdown_image/markdown_image.js | 26 +- app/components/markdown/markdown_link.js | 12 +- app/components/markdown/markdown_list.js | 10 +- app/components/markdown/markdown_list_item.js | 10 +- .../markdown/markdown_table/index.js | 2 +- .../markdown/markdown_table/markdown_table.js | 32 +- .../markdown/markdown_table_cell/index.js | 2 +- .../markdown_table_cell.js | 6 +- .../markdown/markdown_table_image/index.js | 2 +- .../markdown_table_image.js | 12 +- .../markdown/markdown_table_row/index.js | 2 +- .../markdown_table_row/markdown_table_row.js | 8 +- app/components/offline_indicator/index.js | 6 +- .../offline_indicator/offline_indicator.js | 32 +- .../options_context.android.js | 6 +- .../options_context/options_context.ios.js | 10 +- app/components/paper_plane.js | 2 +- app/components/post/index.js | 6 +- app/components/post/post.js | 86 +- .../post_attachment_opengraph/index.js | 4 +- .../post_attachment_opengraph.js | 30 +- app/components/post_body/index.js | 6 +- app/components/post_body/post_body.js | 32 +- .../post_body_additional_content/index.js | 2 +- .../post_body_additional_content.js | 20 +- app/components/post_header/index.js | 2 +- app/components/post_header/post_header.js | 44 +- .../post_list/date_header/date_header.js | 14 +- app/components/post_list/date_header/index.js | 2 +- app/components/post_list/index.js | 6 +- .../post_list/load_more_posts/index.js | 2 +- .../load_more_posts/load_more_posts.js | 10 +- .../post_list/new_messages_divider.js | 14 +- app/components/post_list/post_list.js | 30 +- app/components/post_list/with_layout.js | 4 +- app/components/post_list_retry.js | 20 +- app/components/post_profile_picture/index.js | 2 +- .../post_profile_picture.js | 8 +- .../components/paper_clip_icon.js | 2 +- .../post_textbox/components/typing/index.js | 2 +- .../post_textbox/components/typing/typing.js | 16 +- app/components/post_textbox/index.js | 6 +- app/components/post_textbox/post_textbox.js | 66 +- app/components/profile_picture/index.js | 6 +- .../profile_picture/profile_picture.js | 16 +- app/components/radio_button/index.js | 2 +- app/components/radio_button/radio_button.js | 36 +- .../radio_button/radio_button_group.js | 6 +- app/components/reactions/index.js | 6 +- app/components/reactions/reaction.js | 12 +- app/components/reactions/reactions.js | 16 +- app/components/refresh_list/index.js | 2 +- app/components/refresh_list/refresh_list.js | 2 +- app/components/reply_icon.js | 4 +- app/components/retry_bar_indicator/index.js | 2 +- .../retry_bar_indicator.js | 14 +- app/components/root/index.js | 2 +- app/components/root/root.js | 22 +- app/components/safe_area_view/index.js | 2 +- .../safe_area_view/safe_area_view.android.js | 6 +- .../safe_area_view/safe_area_view.ios.js | 14 +- .../search_bar/search_bar.android.js | 32 +- app/components/search_bar/search_bar.ios.js | 6 +- app/components/search_bar/search_box.js | 84 +- app/components/search_preview/index.js | 6 +- .../search_preview/search_preview.js | 50 +- app/components/settings_drawer/drawer_item.js | 24 +- app/components/settings_drawer/index.js | 6 +- .../settings_drawer/settings_drawer.js | 74 +- .../settings_drawer/status_label/index.js | 2 +- .../status_label/status_label.js | 8 +- .../settings_drawer/user_info/index.js | 2 +- .../settings_drawer/user_info/user_info.js | 14 +- app/components/slack_attachments/index.js | 2 +- .../interactive_action/index.js | 6 +- .../interactive_action/interactive_action.js | 10 +- .../slack_attachments/slack_attachment.js | 48 +- app/components/status_bar/index.js | 2 +- app/components/status_bar/status_bar.js | 4 +- app/components/status_icons/archive_icon.js | 4 +- app/components/status_icons/away_avatar.js | 4 +- app/components/status_icons/away_icon.js | 4 +- app/components/status_icons/dnd_avatar.js | 4 +- app/components/status_icons/dnd_icon.js | 4 +- app/components/status_icons/index.js | 2 +- app/components/status_icons/offline_avatar.js | 4 +- app/components/status_icons/offline_icon.js | 4 +- app/components/status_icons/online_avatar.js | 4 +- app/components/status_icons/online_icon.js | 4 +- app/components/swiper.js | 38 +- .../text_input_with_localized_placeholder.js | 2 +- app/components/tooltip.js | 2 +- app/components/user_status/index.js | 2 +- app/components/user_status/user_status.js | 6 +- app/components/vector_icon.js | 4 +- app/components/video_controls.js | 40 +- app/constants/custom_prop_types.js | 4 +- app/constants/device.js | 4 +- app/constants/index.js | 2 +- app/constants/list.js | 4 +- app/constants/navigation.js | 2 +- app/constants/permissions.js | 2 +- app/constants/view.js | 6 +- app/i18n/index.js | 2 +- app/initial_state.js | 144 +-- app/mattermost.js | 44 +- app/mattermost_bucket/index.js | 2 +- .../mattermost-managed.android.js | 2 +- .../mattermost-managed.ios.js | 2 +- .../notification_preferences.android.js | 4 +- .../notification_preferences.ios.js | 2 +- .../push_notifications.android.js | 4 +- .../push_notifications.ios.js | 14 +- app/reducers/app/index.js | 2 +- app/reducers/device/dimension.js | 2 +- app/reducers/device/index.js | 2 +- app/reducers/device/websocket.js | 6 +- app/reducers/index.js | 2 +- app/reducers/views/channel.js | 44 +- app/reducers/views/client_upgrade.js | 4 +- app/reducers/views/emoji.js | 2 +- app/reducers/views/extension.js | 2 +- app/reducers/views/fetch_cache.js | 2 +- app/reducers/views/i18n.js | 2 +- app/reducers/views/index.js | 2 +- app/reducers/views/login.js | 2 +- app/reducers/views/root.js | 2 +- app/reducers/views/select_server.js | 2 +- app/reducers/views/team.js | 4 +- app/reducers/views/thread.js | 40 +- app/screens/about/about.js | 58 +- app/screens/about/index.js | 2 +- app/screens/add_reaction/add_reaction.js | 16 +- app/screens/add_reaction/index.js | 2 +- app/screens/channel/channel.js | 24 +- .../channel_nav_bar/channel_drawer_button.js | 30 +- .../channel_nav_bar/channel_nav_bar.js | 8 +- .../channel_search_button.js | 22 +- .../channel_search_button/index.js | 4 +- .../channel_title/channel_title.js | 16 +- .../channel_nav_bar/channel_title/index.js | 2 +- app/screens/channel/channel_nav_bar/index.js | 2 +- .../channel_nav_bar/settings_drawer_button.js | 16 +- .../channel_post_list/channel_post_list.js | 26 +- .../channel/channel_post_list/index.js | 6 +- app/screens/channel/index.js | 8 +- .../channel_add_members.js | 32 +- app/screens/channel_add_members/index.js | 6 +- app/screens/channel_info/channel_info.js | 48 +- .../channel_info/channel_info_header.js | 24 +- app/screens/channel_info/channel_info_row.js | 20 +- app/screens/channel_info/index.js | 10 +- .../channel_members/channel_members.js | 44 +- app/screens/channel_members/index.js | 6 +- app/screens/channel_peek/channel_peek.js | 16 +- app/screens/channel_peek/index.js | 6 +- app/screens/client_upgrade/client_upgrade.js | 44 +- app/screens/client_upgrade/index.js | 6 +- .../clock_display/clock_display.android.js | 46 +- .../clock_display/clock_display.ios.js | 8 +- .../clock_display/clock_display_base.js | 12 +- app/screens/clock_display/index.js | 6 +- app/screens/code/code.js | 22 +- app/screens/code/index.js | 2 +- app/screens/create_channel/create_channel.js | 28 +- app/screens/create_channel/index.js | 6 +- app/screens/edit_channel/edit_channel.js | 46 +- app/screens/edit_channel/index.js | 6 +- app/screens/edit_post/edit_post.js | 34 +- app/screens/edit_post/index.js | 6 +- app/screens/edit_profile/edit_profile.js | 80 +- app/screens/edit_profile/edit_profile_item.js | 26 +- app/screens/edit_profile/index.js | 6 +- .../image_preview/downloader.android.js | 32 +- app/screens/image_preview/downloader.ios.js | 66 +- app/screens/image_preview/image_preview.js | 98 +- .../image_preview/image_view.android.js | 34 +- app/screens/image_preview/image_view.ios.js | 12 +- app/screens/image_preview/index.js | 6 +- app/screens/image_preview/previewer.js | 40 +- app/screens/image_preview/video_preview.js | 26 +- app/screens/login/index.js | 6 +- app/screens/login/login.js | 52 +- app/screens/login_options/index.js | 2 +- app/screens/login_options/login_options.js | 26 +- app/screens/mfa/index.js | 6 +- app/screens/mfa/mfa.js | 16 +- app/screens/more_channels/index.js | 6 +- app/screens/more_channels/more_channels.js | 52 +- app/screens/more_dms/index.js | 6 +- app/screens/more_dms/more_dms.js | 58 +- app/screens/more_dms/selected_users/index.js | 2 +- .../more_dms/selected_users/selected_user.js | 12 +- .../more_dms/selected_users/selected_users.js | 12 +- app/screens/notification/index.js | 6 +- app/screens/notification/notification.js | 42 +- app/screens/options_modal/index.js | 2 +- app/screens/options_modal/options_modal.js | 22 +- .../options_modal_list.android.js | 20 +- .../options_modal/options_modal_list.ios.js | 26 +- .../channel_display_name.js | 6 +- .../search/channel_display_name/index.js | 2 +- app/screens/search/index.js | 8 +- app/screens/search/search.js | 120 +-- .../search/search_result_post/index.js | 2 +- .../search_result_post/search_result_post.js | 2 +- app/screens/select_server/index.js | 6 +- app/screens/select_server/select_server.js | 48 +- app/screens/select_team/index.js | 6 +- app/screens/select_team/select_team.js | 46 +- .../advanced_settings/advanced_settings.js | 34 +- .../settings/advanced_settings/index.js | 6 +- .../display_settings/display_settings.js | 24 +- .../settings/display_settings/index.js | 2 +- app/screens/settings/general/index.js | 6 +- app/screens/settings/general/settings.js | 52 +- .../settings/notification_settings/index.js | 6 +- .../notification_settings.js | 86 +- .../notification_settings_email/index.js | 2 +- .../notification_settings_email.js | 24 +- .../notification_settings_mentions/index.js | 2 +- .../notification_settings_mention_base.js | 16 +- .../notification_settings_mentions.android.js | 50 +- .../notification_settings_mentions.ios.js | 20 +- .../index.js | 2 +- ...notification_settings_mentions_keywords.js | 18 +- .../notification_settings_mobile/index.js | 2 +- .../notification_settings_mobile.android.js | 78 +- .../notification_settings_mobile.ios.js | 16 +- .../notification_settings_mobile_base.js | 12 +- app/screens/settings/section.js | 16 +- app/screens/settings/section_item.js | 24 +- app/screens/settings/settings_item/index.js | 8 +- .../settings/settings_item/style.android.js | 22 +- .../settings/settings_item/style.ios.js | 24 +- app/screens/sso/index.js | 6 +- app/screens/sso/sso.js | 28 +- app/screens/table/table.js | 8 +- app/screens/table_image/index.js | 2 +- app/screens/table_image/table_image.js | 20 +- app/screens/thread/index.js | 6 +- app/screens/thread/thread.js | 16 +- app/screens/user_profile/index.js | 6 +- app/screens/user_profile/user_profile.js | 32 +- app/screens/user_profile/user_profile_row.js | 22 +- app/selectors/autocomplete.js | 2 +- app/selectors/client_upgrade.js | 2 +- app/selectors/views.js | 2 +- app/store/index.js | 44 +- app/store/middleware.js | 44 +- app/styles/index.js | 32 +- app/utils/file.js | 2 +- app/utils/latinise.js | 2 +- app/utils/markdown.js | 54 +- app/utils/member_list.js | 2 +- app/utils/network.js | 2 +- app/utils/notify_props.js | 2 +- app/utils/segment.js | 18 +- app/utils/sentry/index.js | 14 +- app/utils/sentry/middleware.js | 2 +- app/utils/theme.js | 2 +- app/utils/time_tracker.js | 2 +- package.json | 2 + rn-cli.config.js | 4 +- share_extension/android/actions/index.js | 2 +- .../extension_channel_item.js | 22 +- .../extension_channels/extension_channels.js | 42 +- .../android/extension_channels/index.js | 4 +- .../channel_button/channel_button.js | 18 +- .../extension_post/channel_button/index.js | 2 +- .../android/extension_post/extension_post.js | 88 +- .../android/extension_post/index.js | 2 +- .../extension_post/team_button/index.js | 2 +- .../extension_post/team_button/team_button.js | 18 +- .../extension_teams/extension_teams.js | 20 +- .../android/extension_teams/index.js | 6 +- .../extension_teams/team_item/index.js | 2 +- .../extension_teams/team_item/team_item.js | 22 +- share_extension/android/navigation.js | 18 +- share_extension/android/selectors/index.js | 8 +- share_extension/common/icons/channel_type.js | 8 +- share_extension/common/icons/excel.js | 4 +- share_extension/common/icons/generic.js | 4 +- share_extension/common/icons/pdf.js | 4 +- share_extension/common/icons/ppt.js | 4 +- share_extension/common/icons/zip.js | 4 +- share_extension/ios/extension_channels.js | 40 +- share_extension/ios/extension_nav_bar.js | 22 +- share_extension/ios/extension_post.js | 94 +- share_extension/ios/extension_team_item.js | 26 +- share_extension/ios/extension_teams.js | 30 +- share_extension/ios/index.js | 30 +- test/app/actions/thread.test.js | 22 +- .../app/components/markdown/transform.test.js | 990 +++++++++--------- test/app/selectors/post_list.test.js | 102 +- test/mocks.js | 2 +- test/test_helper.js | 12 +- 411 files changed, 3944 insertions(+), 3942 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5eae59517..5890e26bb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -40,7 +40,7 @@ "brace-style": [2, "1tbs", { "allowSingleLine": false }], "camelcase": [2, {"properties": "never"}], "class-methods-use-this": 0, - "comma-dangle": [2, "never"], + "comma-dangle": [2, "always-multiline"], "comma-spacing": [2, {"before": false, "after": true}], "comma-style": [2, "last"], "complexity": [1, 10], diff --git a/Makefile b/Makefile index 8021278d8..f8fd16db6 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ pre-run: | .yarninstall .podinstall dist/assets ## Installs dependencies and ass check-style: .yarninstall ## Runs eslint @echo Checking for style guide compliance - @node_modules/.bin/eslint --ext \".js\" --ignore-pattern node_modules --quiet . + @yarn run check clean: ## Cleans dependencies, previous builds and temp files @echo Cleaning started diff --git a/app/actions/device/index.js b/app/actions/device/index.js index faf5f214d..d03947657 100644 --- a/app/actions/device/index.js +++ b/app/actions/device/index.js @@ -11,8 +11,8 @@ export function calculateDeviceDimensions() { type: DeviceTypes.DEVICE_DIMENSIONS_CHANGED, data: { deviceHeight: height, - deviceWidth: width - } + deviceWidth: width, + }, }; } @@ -20,7 +20,7 @@ export function connection(isOnline) { return async (dispatch, getState) => { dispatch({ type: DeviceTypes.CONNECTION_CHANGED, - data: isOnline + data: isOnline, }, getState); }; } @@ -28,21 +28,21 @@ export function connection(isOnline) { export function setStatusBarHeight(height = 20) { return { type: DeviceTypes.STATUSBAR_HEIGHT_CHANGED, - data: height + data: height, }; } export function setDeviceOrientation(orientation) { return { type: DeviceTypes.DEVICE_ORIENTATION_CHANGED, - data: orientation + data: orientation, }; } export function setDeviceAsTablet() { return { type: DeviceTypes.DEVICE_TYPE_CHANGED, - data: true + data: true, }; } @@ -51,5 +51,5 @@ export default { connection, setDeviceOrientation, setDeviceAsTablet, - setStatusBarHeight + setStatusBarHeight, }; diff --git a/app/actions/views/account_notifications.js b/app/actions/views/account_notifications.js index d1550749d..9dcdb3831 100644 --- a/app/actions/views/account_notifications.js +++ b/app/actions/views/account_notifications.js @@ -19,7 +19,7 @@ export function handleUpdateUserNotifyProps(notifyProps) { user_id: userId, category: Preferences.CATEGORY_NOTIFICATIONS, name: Preferences.EMAIL_INTERVAL, - value: interval + value: interval, }]; savePreferences(currentUserId, emailInterval)(dispatch, getState); diff --git a/app/actions/views/announcement.js b/app/actions/views/announcement.js index ba2b97a49..ceb662027 100644 --- a/app/actions/views/announcement.js +++ b/app/actions/views/announcement.js @@ -6,6 +6,6 @@ import {ViewTypes} from 'app/constants'; export function dismissBanner(text) { return { type: ViewTypes.ANNOUNCEMENT_BANNER, - data: text + data: text, }; } diff --git a/app/actions/views/channel.js b/app/actions/views/channel.js index f22cc7e53..043f9efea 100644 --- a/app/actions/views/channel.js +++ b/app/actions/views/channel.js @@ -10,7 +10,7 @@ import { fetchMyChannelsAndMembers, markChannelAsRead, selectChannel, - leaveChannel as serviceLeaveChannel + leaveChannel as serviceLeaveChannel, } from 'mattermost-redux/actions/channels'; import {getPosts, getPostsBefore, getPostsSince, getPostThread} from 'mattermost-redux/actions/posts'; import {getFilesForPost} from 'mattermost-redux/actions/files'; @@ -25,7 +25,7 @@ import { getDirectChannelName, getUserIdFromChannelName, isDirectChannel, - isGroupChannel + isGroupChannel, } from 'mattermost-redux/utils/channel_utils'; import {getLastCreateAt} from 'mattermost-redux/utils/post_utils'; import {getPreferencesByCategory} from 'mattermost-redux/utils/preference_utils'; @@ -58,7 +58,7 @@ export function loadProfilesAndTeamMembersForDMSidebar(teamId) { user_id: currentUserId, category: Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, name, - value: 'true' + value: 'true', }; } @@ -130,7 +130,7 @@ export function loadProfilesAndTeamMembersForDMSidebar(teamId) { actions.push({ type: UserTypes.RECEIVED_PROFILE_IN_CHANNEL, data: {user_id: members[i]}, - id: channel.id + id: channel.id, }); } } @@ -184,7 +184,7 @@ export function loadPostsIfNecessaryWithRetry(channelId) { dispatch({ type: ViewTypes.RECEIVED_POSTS_FOR_CHANNEL_AT_TIME, channelId, - time + time, }); } @@ -285,14 +285,14 @@ export function handleSelectChannel(channelId) { dispatch(batchActions([ { type: ViewTypes.SET_INITIAL_POST_VISIBILITY, - data: channelId + data: channelId, }, setChannelLoading(false), { type: ViewTypes.SET_LAST_CHANNEL_FOR_TEAM, teamId: currentTeamId, - channelId - } + channelId, + }, ])); }; } @@ -302,7 +302,7 @@ export function handlePostDraftChanged(channelId, draft) { dispatch({ type: ViewTypes.POST_DRAFT_CHANGED, channelId, - draft + draft, }, getState); }; } @@ -311,7 +311,7 @@ export function handlePostDraftSelectionChanged(channelId, cursorPosition) { return { type: ViewTypes.POST_DRAFT_SELECTION_CHANGED, channelId, - cursorPosition + cursorPosition, }; } @@ -330,7 +330,7 @@ export function insertToDraft(value) { cursorPosition = threadDraft.cursorPosition; action = { type: ViewTypes.COMMENT_DRAFT_CHANGED, - rootId: threadId + rootId: threadId, }; } else if (state.views.channel.drafts[channelId]) { const channelDraft = state.views.channel.drafts[channelId]; @@ -338,7 +338,7 @@ export function insertToDraft(value) { cursorPosition = channelDraft.cursorPosition; action = { type: ViewTypes.POST_DRAFT_CHANGED, - channelId + channelId, }; } @@ -352,7 +352,7 @@ export function insertToDraft(value) { if (action && nextDraft !== draft) { dispatch({ ...action, - draft: nextDraft + draft: nextDraft, }); } }; @@ -367,7 +367,7 @@ export function toggleDMChannel(otherUserId, visible) { user_id: currentUserId, category: Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, name: otherUserId, - value: visible + value: visible, }]; savePreferences(currentUserId, dm)(dispatch, getState); @@ -383,7 +383,7 @@ export function toggleGMChannel(channelId, visible) { user_id: currentUserId, category: Preferences.CATEGORY_GROUP_CHANNEL_SHOW, name: channelId, - value: visible + value: visible, }]; savePreferences(currentUserId, gm)(dispatch, getState); @@ -436,28 +436,28 @@ export function leaveChannel(channel, reset = false) { export function setChannelLoading(loading = true) { return { type: ViewTypes.SET_CHANNEL_LOADER, - loading + loading, }; } export function setChannelRefreshing(loading = true) { return { type: ViewTypes.SET_CHANNEL_REFRESHING, - loading + loading, }; } export function setChannelRetryFailed(failed = true) { return { type: ViewTypes.SET_CHANNEL_RETRY_FAILED, - failed + failed, }; } export function setChannelDisplayName(displayName) { return { type: ViewTypes.SET_CHANNEL_DISPLAY_NAME, - displayName + displayName, }; } @@ -482,7 +482,7 @@ export function increasePostVisibility(channelId, focusedPostId) { // We already have the posts, so we just need to show them dispatch(batchActions([ doIncreasePostVisibility(channelId), - setLoadMorePostsVisible(true) + setLoadMorePostsVisible(true), ])); return; @@ -492,7 +492,7 @@ export function increasePostVisibility(channelId, focusedPostId) { dispatch({ type: ViewTypes.LOADING_POSTS, data: true, - channelId + channelId, }); const pageSize = ViewTypes.POST_VISIBILITY_CHUNK_SIZE; @@ -508,7 +508,7 @@ export function increasePostVisibility(channelId, focusedPostId) { const actions = [{ type: ViewTypes.LOADING_POSTS, data: false, - channelId + channelId, }]; const posts = result.data; @@ -528,13 +528,13 @@ function doIncreasePostVisibility(channelId) { return { type: ViewTypes.INCREASE_POST_VISIBILITY, data: channelId, - amount: ViewTypes.POST_VISIBILITY_CHUNK_SIZE + amount: ViewTypes.POST_VISIBILITY_CHUNK_SIZE, }; } function setLoadMorePostsVisible(visible) { return { type: ViewTypes.SET_LOAD_MORE_POSTS_VISIBLE, - data: visible + data: visible, }; } diff --git a/app/actions/views/client_upgrade.js b/app/actions/views/client_upgrade.js index 908a77d8c..0406519c2 100644 --- a/app/actions/views/client_upgrade.js +++ b/app/actions/views/client_upgrade.js @@ -5,6 +5,6 @@ import {ViewTypes} from 'app/constants'; export function setLastUpgradeCheck() { return { - type: ViewTypes.SET_LAST_UPGRADE_CHECK + type: ViewTypes.SET_LAST_UPGRADE_CHECK, }; } diff --git a/app/actions/views/command.js b/app/actions/views/command.js index fd882bb98..f4d76f536 100644 --- a/app/actions/views/command.js +++ b/app/actions/views/command.js @@ -14,7 +14,7 @@ export function executeCommand(message, channelId, rootId) { channel_id: channelId, team_id: teamId, root_id: rootId, - parent_id: rootId + parent_id: rootId, }; let msg = message; diff --git a/app/actions/views/create_channel.js b/app/actions/views/create_channel.js index 66ca49c4f..d9ff394d2 100644 --- a/app/actions/views/create_channel.js +++ b/app/actions/views/create_channel.js @@ -18,7 +18,7 @@ export function handleCreateChannel(displayName, purpose, header, type) { display_name: displayName, purpose, header, - type + type, }; const {data} = await createChannel(channel, currentUserId)(dispatch, getState); diff --git a/app/actions/views/emoji.js b/app/actions/views/emoji.js index 1ef09e266..158e1b11e 100644 --- a/app/actions/views/emoji.js +++ b/app/actions/views/emoji.js @@ -29,14 +29,14 @@ export function addReactionToLatestPost(emoji, rootId) { export function addRecentEmoji(emoji) { return { type: ViewTypes.ADD_RECENT_EMOJI, - emoji + emoji, }; } export function incrementEmojiPickerPage() { return async (dispatch) => { dispatch({ - type: ViewTypes.INCREMENT_EMOJI_PICKER_PAGE + type: ViewTypes.INCREMENT_EMOJI_PICKER_PAGE, }); return {data: true}; diff --git a/app/actions/views/file_preview.js b/app/actions/views/file_preview.js index 3e8396c23..7b61aa6d2 100644 --- a/app/actions/views/file_preview.js +++ b/app/actions/views/file_preview.js @@ -6,6 +6,6 @@ import {ViewTypes} from 'app/constants'; export function addFileToFetchCache(url) { return { type: ViewTypes.ADD_FILE_TO_FETCH_CACHE, - url + url, }; } diff --git a/app/actions/views/file_upload.js b/app/actions/views/file_upload.js index df6f682d6..c77cd0a52 100644 --- a/app/actions/views/file_upload.js +++ b/app/actions/views/file_upload.js @@ -7,7 +7,7 @@ import {uploadFile} from 'mattermost-redux/actions/files'; import { buildFileUploadData, encodeHeaderURIStringToUTF8, - generateId + generateId, } from 'app/utils/file'; import {ViewTypes} from 'app/constants'; @@ -28,7 +28,7 @@ export function handleUploadFiles(files, rootId) { localPath: fileData.uri, name: fileData.name, type: fileData.mimeType, - extension: fileData.extension + extension: fileData.extension, }); fileData.name = encodeHeaderURIStringToUTF8(file.fileName); @@ -46,7 +46,7 @@ export function handleUploadFiles(files, rootId) { type: ViewTypes.SET_TEMP_UPLOAD_FILES_FOR_POST_DRAFT, clientIds, channelId, - rootId + rootId, }); const clientIdsArray = clientIds.map((c) => c.clientId); @@ -64,7 +64,7 @@ export function retryFileUpload(file, rootId) { const fileData = { uri: file.localPath, name: file.name, - type: file.type + type: file.type, }; fileData.name = encodeHeaderURIStringToUTF8(file.fileName); @@ -81,7 +81,7 @@ export function retryFileUpload(file, rootId) { type: ViewTypes.RETRY_UPLOAD_FILE_FOR_POST, clientId: file.clientId, channelId, - rootId + rootId, }); await uploadFile(channelId, rootId, [file.clientId], formData, formBoundary)(dispatch, getState); @@ -92,7 +92,7 @@ export function handleClearFiles(channelId, rootId) { return { type: ViewTypes.CLEAR_FILES_FOR_POST_DRAFT, channelId, - rootId + rootId, }; } @@ -100,7 +100,7 @@ export function handleClearFailedFiles(channelId, rootId) { return { type: ViewTypes.CLEAR_FAILED_FILES_FOR_POST_DRAFT, channelId, - rootId + rootId, }; } @@ -109,7 +109,7 @@ export function handleRemoveFile(clientId, channelId, rootId) { type: ViewTypes.REMOVE_FILE_FROM_POST_DRAFT, clientId, channelId, - rootId + rootId, }; } @@ -117,6 +117,6 @@ export function handleRemoveLastFile(channelId, rootId) { return { type: ViewTypes.REMOVE_LAST_FILE_FROM_POST_DRAFT, channelId, - rootId + rootId, }; } diff --git a/app/actions/views/login.js b/app/actions/views/login.js index f798f9d39..8bacfc2bf 100644 --- a/app/actions/views/login.js +++ b/app/actions/views/login.js @@ -11,7 +11,7 @@ export function handleLoginIdChanged(loginId) { return async (dispatch, getState) => { dispatch({ type: ViewTypes.LOGIN_ID_CHANGED, - loginId + loginId, }, getState); }; } @@ -20,7 +20,7 @@ export function handlePasswordChanged(password) { return async (dispatch, getState) => { dispatch({ type: ViewTypes.PASSWORD_CHANGED, - password + password, }, getState); }; } @@ -35,8 +35,8 @@ export function handleSuccessfulLogin() { type: GeneralTypes.RECEIVED_APP_CREDENTIALS, data: { url, - token - } + token, + }, }, getState); if (config.DataRetentionEnableMessageDeletion && config.DataRetentionEnableMessageDeletion === 'true' && @@ -73,5 +73,5 @@ export default { handleLoginIdChanged, handlePasswordChanged, handleSuccessfulLogin, - getSession + getSession, }; diff --git a/app/actions/views/root.js b/app/actions/views/root.js index 7e7571010..6dccf4be8 100644 --- a/app/actions/views/root.js +++ b/app/actions/views/root.js @@ -14,7 +14,7 @@ import {recordTime} from 'app/utils/segment'; import { handleSelectChannel, setChannelDisplayName, - retryGetPostsAction + retryGetPostsAction, } from 'app/actions/views/channel'; export function loadConfigAndLicense() { @@ -22,7 +22,7 @@ export function loadConfigAndLicense() { const {currentUserId} = getState().entities.users; const [configData, licenseData] = await Promise.all([ getClientConfig()(dispatch, getState), - getLicenseConfig()(dispatch, getState) + getLicenseConfig()(dispatch, getState), ]); const config = configData.data || {}; @@ -56,7 +56,7 @@ export function loadFromPushNotification(notification) { if (teamId && (!teams[teamId] || !myTeamMembers[teamId])) { await Promise.all([ getMyTeams()(dispatch, getState), - getMyTeamMembers()(dispatch, getState) + getMyTeamMembers()(dispatch, getState), ]); } @@ -95,7 +95,7 @@ export function createPost(post) { ...post, pending_post_id: pendingPostId, create_at: timestamp, - update_at: timestamp + update_at: timestamp, }; return Client4.createPost({...newPost, create_at: 0}).then((payload) => { @@ -104,10 +104,10 @@ export function createPost(post) { data: { order: [], posts: { - [payload.id]: payload - } + [payload.id]: payload, + }, }, - channelId: payload.channel_id + channelId: payload.channel_id, }); }); }; @@ -124,5 +124,5 @@ export function recordLoadTime(screenName, category) { export default { loadConfigAndLicense, loadFromPushNotification, - purgeOfflineStore + purgeOfflineStore, }; diff --git a/app/actions/views/search.js b/app/actions/views/search.js index e32b9f63c..b2d12cee0 100644 --- a/app/actions/views/search.js +++ b/app/actions/views/search.js @@ -7,7 +7,7 @@ export function handleSearchDraftChanged(text) { return async (dispatch, getState) => { dispatch({ type: ViewTypes.SEARCH_DRAFT_CHANGED, - text + text, }, getState); }; } diff --git a/app/actions/views/select_server.js b/app/actions/views/select_server.js index 03fc46a07..0552abe40 100644 --- a/app/actions/views/select_server.js +++ b/app/actions/views/select_server.js @@ -11,11 +11,11 @@ export function handleServerUrlChanged(serverUrl) { dispatch(batchActions([ {type: GeneralTypes.CLIENT_CONFIG_RESET}, {type: GeneralTypes.CLIENT_LICENSE_RESET}, - {type: ViewTypes.SERVER_URL_CHANGED, serverUrl} + {type: ViewTypes.SERVER_URL_CHANGED, serverUrl}, ]), getState); }; } export default { - handleServerUrlChanged + handleServerUrlChanged, }; diff --git a/app/actions/views/select_team.js b/app/actions/views/select_team.js index b159a2884..8e04e1783 100644 --- a/app/actions/views/select_team.js +++ b/app/actions/views/select_team.js @@ -22,7 +22,7 @@ export function handleTeamChange(teamId, selectChannel = true) { const actions = [ setChannelDisplayName(''), - {type: TeamTypes.SELECT_TEAM, data: teamId} + {type: TeamTypes.SELECT_TEAM, data: teamId}, ]; if (selectChannel) { @@ -55,5 +55,5 @@ export function selectFirstAvailableTeam() { export default { handleTeamChange, - selectFirstAvailableTeam + selectFirstAvailableTeam, }; diff --git a/app/actions/views/thread.js b/app/actions/views/thread.js index b2e33896f..159106454 100644 --- a/app/actions/views/thread.js +++ b/app/actions/views/thread.js @@ -8,7 +8,7 @@ export function handleCommentDraftChanged(rootId, draft) { dispatch({ type: ViewTypes.COMMENT_DRAFT_CHANGED, rootId, - draft + draft, }, getState); }; } @@ -17,6 +17,6 @@ export function handleCommentDraftSelectionChanged(rootId, cursorPosition) { return { type: ViewTypes.COMMENT_DRAFT_SELECTION_CHANGED, rootId, - cursorPosition + cursorPosition, }; } diff --git a/app/components/announcement_banner/announcement_banner.js b/app/components/announcement_banner/announcement_banner.js index 9579ec6b4..599e12371 100644 --- a/app/components/announcement_banner/announcement_banner.js +++ b/app/components/announcement_banner/announcement_banner.js @@ -8,7 +8,7 @@ import { Animated, StyleSheet, Text, - TouchableOpacity + TouchableOpacity, } from 'react-native'; import {intlShape} from 'react-intl'; import MaterialIcons from 'react-native-vector-icons/MaterialIcons'; @@ -18,22 +18,22 @@ const {View: AnimatedView} = Animated; export default class AnnouncementBanner extends PureComponent { static propTypes = { actions: PropTypes.shape({ - dismissBanner: PropTypes.func.isRequired + dismissBanner: PropTypes.func.isRequired, }).isRequired, allowDismissal: PropTypes.bool, bannerColor: PropTypes.string, bannerDismissed: PropTypes.bool, bannerEnabled: PropTypes.bool, bannerText: PropTypes.string, - bannerTextColor: PropTypes.string + bannerTextColor: PropTypes.string, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; state = { - bannerHeight: new Animated.Value(0) + bannerHeight: new Animated.Value(0), }; componentWillMount() { @@ -59,13 +59,13 @@ export default class AnnouncementBanner extends PureComponent { handlePress = () => { const {formatMessage} = this.context.intl; const options = [{ - text: formatMessage({id: 'mobile.announcement_banner.ok', defaultMessage: 'OK'}) + text: formatMessage({id: 'mobile.announcement_banner.ok', defaultMessage: 'OK'}), }]; if (this.props.allowDismissal) { options.push({ text: formatMessage({id: 'mobile.announcement_banner.dismiss', defaultMessage: 'Dismiss'}), - onPress: this.handleDismiss + onPress: this.handleDismiss, }); } @@ -81,7 +81,7 @@ export default class AnnouncementBanner extends PureComponent { const value = show ? 38 : 0; Animated.timing(this.state.bannerHeight, { toValue: value, - duration: 350 + duration: 350, }).start(); }; @@ -90,11 +90,11 @@ export default class AnnouncementBanner extends PureComponent { const bannerStyle = { backgroundColor: this.props.bannerColor, - height: bannerHeight + height: bannerHeight, }; const bannerTextStyle = { - color: this.props.bannerTextColor + color: this.props.bannerTextColor, }; return ( @@ -129,16 +129,16 @@ const style = StyleSheet.create({ position: 'absolute', top: 0, overflow: 'hidden', - width: '100%' + width: '100%', }, wrapper: { alignItems: 'center', flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, bannerText: { flex: 1, fontSize: 14, - marginRight: 5 - } + marginRight: 5, + }, }); diff --git a/app/components/announcement_banner/index.js b/app/components/announcement_banner/index.js index 59920d9e4..ec9c0bef8 100644 --- a/app/components/announcement_banner/index.js +++ b/app/components/announcement_banner/index.js @@ -21,15 +21,15 @@ function mapStateToProps(state) { bannerDismissed: config.BannerText === announcement, bannerEnabled: config.EnableBanner === 'true' && license.IsLicensed === 'true', bannerText: config.BannerText, - bannerTextColor: config.BannerTextColor + bannerTextColor: config.BannerTextColor, }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - dismissBanner - }, dispatch) + dismissBanner, + }, dispatch), }; } diff --git a/app/components/app_icon.js b/app/components/app_icon.js index 7c4a5ec92..fe573b8a8 100644 --- a/app/components/app_icon.js +++ b/app/components/app_icon.js @@ -5,14 +5,14 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import Svg, { G, - Path + Path, } from 'react-native-svg'; export default class AwayStatus extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/at_mention/at_mention.js b/app/components/at_mention/at_mention.js index 0c83363c0..2bccf5f6c 100644 --- a/app/components/at_mention/at_mention.js +++ b/app/components/at_mention/at_mention.js @@ -19,11 +19,11 @@ export default class AtMention extends React.PureComponent { onPostPress: PropTypes.func, textStyle: CustomPropTypes.Style, theme: PropTypes.object.isRequired, - usersByUsername: PropTypes.object.isRequired + usersByUsername: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, } constructor(props) { @@ -32,7 +32,7 @@ export default class AtMention extends React.PureComponent { const userDetails = this.getUserDetailsFromMentionName(props); this.state = { username: userDetails.username, - id: userDetails.id + id: userDetails.id, }; } @@ -41,7 +41,7 @@ export default class AtMention extends React.PureComponent { const userDetails = this.getUserDetailsFromMentionName(nextProps); this.setState({ username: userDetails.username, - id: userDetails.id + id: userDetails.id, }); } } @@ -56,14 +56,14 @@ export default class AtMention extends React.PureComponent { animated: true, backButtonTitle: '', passProps: { - userId: this.state.id + userId: this.state.id, }, navigatorStyle: { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }; @@ -75,7 +75,7 @@ export default class AtMention extends React.PureComponent { const user = props.usersByUsername[mentionName]; return { username: user.username, - id: user.id + id: user.id, }; } @@ -88,7 +88,7 @@ export default class AtMention extends React.PureComponent { } return { - username: '' + username: '', }; } @@ -102,9 +102,9 @@ export default class AtMention extends React.PureComponent { action = { text: intl.formatMessage({ id: 'mobile.mention.copy_mention', - defaultMessage: 'Copy Mention' + defaultMessage: 'Copy Mention', }), - onPress: this.handleCopyMention + onPress: this.handleCopyMention, }; } diff --git a/app/components/at_mention/index.js b/app/components/at_mention/index.js index ca3cb49ac..ae0a01837 100644 --- a/app/components/at_mention/index.js +++ b/app/components/at_mention/index.js @@ -12,7 +12,7 @@ import AtMention from './at_mention'; function mapStateToProps(state) { return { theme: getTheme(state), - usersByUsername: getUsersByUsername(state) + usersByUsername: getUsersByUsername(state), }; } diff --git a/app/components/attachment_button.js b/app/components/attachment_button.js index 2b8f8dbdd..dbdedc122 100644 --- a/app/components/attachment_button.js +++ b/app/components/attachment_button.js @@ -4,7 +4,7 @@ import {injectIntl, intlShape} from 'react-intl'; import { Platform, StyleSheet, - TouchableOpacity + TouchableOpacity, } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import ImagePicker from 'react-native-image-picker'; @@ -22,11 +22,11 @@ class AttachmentButton extends PureComponent { onShowFileMaxWarning: PropTypes.func, theme: PropTypes.object.isRequired, uploadFiles: PropTypes.func.isRequired, - wrapper: PropTypes.bool + wrapper: PropTypes.bool, }; static defaultProps = { - maxFileCount: 5 + maxFileCount: 5, }; attachFileFromCamera = () => { @@ -36,23 +36,23 @@ class AttachmentButton extends PureComponent { noData: true, storageOptions: { cameraRoll: true, - waitUntilSaved: true + waitUntilSaved: true, }, permissionDenied: { title: formatMessage({ id: 'mobile.android.camera_permission_denied_title', - defaultMessage: 'Camera access is required' + defaultMessage: 'Camera access is required', }), text: formatMessage({ id: 'mobile.android.camera_permission_denied_description', - defaultMessage: 'To take photos and videos with your camera, please change your permission settings.' + defaultMessage: 'To take photos and videos with your camera, please change your permission settings.', }), reTryTitle: formatMessage({ id: 'mobile.android.permission_denied_retry', - defaultMessage: 'Set Permission' + defaultMessage: 'Set Permission', }), - okTitle: formatMessage({id: 'mobile.android.permission_denied_dismiss', defaultMessage: 'Dismiss'}) - } + okTitle: formatMessage({id: 'mobile.android.permission_denied_dismiss', defaultMessage: 'Dismiss'}), + }, }; ImagePicker.launchCamera(options, (response) => { @@ -72,18 +72,18 @@ class AttachmentButton extends PureComponent { permissionDenied: { title: formatMessage({ id: 'mobile.android.photos_permission_denied_title', - defaultMessage: 'Photo library access is required' + defaultMessage: 'Photo library access is required', }), text: formatMessage({ id: 'mobile.android.photos_permission_denied_description', - defaultMessage: 'To upload images from your library, please change your permission settings.' + defaultMessage: 'To upload images from your library, please change your permission settings.', }), reTryTitle: formatMessage({ id: 'mobile.android.permission_denied_retry', - defaultMessage: 'Set Permission' + defaultMessage: 'Set Permission', }), - okTitle: formatMessage({id: 'mobile.android.permission_denied_dismiss', defaultMessage: 'Dismiss'}) - } + okTitle: formatMessage({id: 'mobile.android.permission_denied_dismiss', defaultMessage: 'Dismiss'}), + }, }; if (Platform.OS === 'ios') { @@ -108,18 +108,18 @@ class AttachmentButton extends PureComponent { permissionDenied: { title: formatMessage({ id: 'mobile.android.videos_permission_denied_title', - defaultMessage: 'Video library access is required' + defaultMessage: 'Video library access is required', }), text: formatMessage({ id: 'mobile.android.videos_permission_denied_description', - defaultMessage: 'To upload videos from your library, please change your permission settings.' + defaultMessage: 'To upload videos from your library, please change your permission settings.', }), reTryTitle: formatMessage({ id: 'mobile.android.permission_denied_retry', - defaultMessage: 'Set Permission' + defaultMessage: 'Set Permission', }), - okTitle: formatMessage({id: 'mobile.android.permission_denied_dismiss', defaultMessage: 'Dismiss'}) - } + okTitle: formatMessage({id: 'mobile.android.permission_denied_dismiss', defaultMessage: 'Dismiss'}), + }, }; ImagePicker.launchImageLibrary(options, (response) => { @@ -137,7 +137,7 @@ class AttachmentButton extends PureComponent { handleFileAttachmentOption = (action) => { this.props.navigator.dismissModal({ - animationType: 'none' + animationType: 'none', }); // Have to wait to launch the library attachment action. @@ -164,17 +164,17 @@ class AttachmentButton extends PureComponent { action: () => this.handleFileAttachmentOption(this.attachFileFromCamera), text: { id: 'mobile.file_upload.camera', - defaultMessage: 'Take Photo or Video' + defaultMessage: 'Take Photo or Video', }, - icon: 'camera' + icon: 'camera', }, { action: () => this.handleFileAttachmentOption(this.attachFileFromLibrary), text: { id: 'mobile.file_upload.library', - defaultMessage: 'Photo Library' + defaultMessage: 'Photo Library', }, - icon: 'photo' - }] + icon: 'photo', + }], }; if (Platform.OS === 'android') { @@ -182,9 +182,9 @@ class AttachmentButton extends PureComponent { action: () => this.handleFileAttachmentOption(this.attachVideoFromLibraryAndroid), text: { id: 'mobile.file_upload.video', - defaultMessage: 'Video Library' + defaultMessage: 'Video Library', }, - icon: 'file-video-o' + icon: 'file-video-o', }); } @@ -193,15 +193,15 @@ class AttachmentButton extends PureComponent { title: '', animationType: 'none', passProps: { - items: options.items + items: options.items, }, navigatorStyle: { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, screenBackgroundColor: 'transparent', - modalPresentationStyle: 'overCurrentContext' - } + modalPresentationStyle: 'overCurrentContext', + }, }); }; @@ -238,18 +238,18 @@ const style = StyleSheet.create({ attachIcon: { marginTop: Platform.select({ ios: 2, - android: 0 - }) + android: 0, + }), }, buttonContainer: { height: Platform.select({ ios: 34, - android: 36 + android: 36, }), width: 45, alignItems: 'center', - justifyContent: 'center' - } + justifyContent: 'center', + }, }); export default injectIntl(AttachmentButton); diff --git a/app/components/autocomplete/at_mention/at_mention.js b/app/components/autocomplete/at_mention/at_mention.js index 27628c054..33d3e08c0 100644 --- a/app/components/autocomplete/at_mention/at_mention.js +++ b/app/components/autocomplete/at_mention/at_mention.js @@ -17,7 +17,7 @@ import {makeStyleSheetFromTheme} from 'app/utils/theme'; export default class AtMention extends PureComponent { static propTypes = { actions: PropTypes.shape({ - autocompleteUsers: PropTypes.func.isRequired + autocompleteUsers: PropTypes.func.isRequired, }).isRequired, currentChannelId: PropTypes.string, currentTeamId: PropTypes.string.isRequired, @@ -33,20 +33,20 @@ export default class AtMention extends PureComponent { requestStatus: PropTypes.string.isRequired, teamMembers: PropTypes.array, theme: PropTypes.object.isRequired, - value: PropTypes.string + value: PropTypes.string, }; static defaultProps = { defaultChannel: {}, isSearch: false, - value: '' + value: '', }; constructor(props) { super(props); this.state = { - sections: [] + sections: [], }; } @@ -56,7 +56,7 @@ export default class AtMention extends PureComponent { // if the term changes but is null or the mention has been completed we render this component as null this.setState({ mentionComplete: false, - sections: [] + sections: [], }); this.props.onResultCountChange(0); @@ -84,7 +84,7 @@ export default class AtMention extends PureComponent { id: 'mobile.suggestion.members', defaultMessage: 'Members', data: teamMembers, - key: 'teamMembers' + key: 'teamMembers', }); } else { if (inChannel.length) { @@ -92,7 +92,7 @@ export default class AtMention extends PureComponent { id: 'suggestion.mention.members', defaultMessage: 'Channel Members', data: inChannel, - key: 'inChannel' + key: 'inChannel', }); } @@ -102,7 +102,7 @@ export default class AtMention extends PureComponent { defaultMessage: 'Special Mentions', data: this.getSpecialMentions(), key: 'special', - renderItem: this.renderSpecialMentions + renderItem: this.renderSpecialMentions, }); } @@ -111,13 +111,13 @@ export default class AtMention extends PureComponent { id: 'suggestion.mention.nonmembers', defaultMessage: 'Not in Channel', data: outChannel, - key: 'outChannel' + key: 'outChannel', }); } } this.setState({ - sections + sections, }); this.props.onResultCountChange(sections.reduce((total, section) => total + section.data.length, 0)); @@ -134,16 +134,16 @@ export default class AtMention extends PureComponent { id: 'suggestion.mention.all', defaultMessage: 'Notifies everyone in the channel, use in {townsquare} to notify the whole team', values: { - townsquare: this.props.defaultChannel.display_name - } + townsquare: this.props.defaultChannel.display_name, + }, }, { completeHandle: 'channel', id: 'suggestion.mention.channel', - defaultMessage: 'Notifies everyone in the channel' + defaultMessage: 'Notifies everyone in the channel', }, { completeHandle: 'here', id: 'suggestion.mention.here', - defaultMessage: 'Notifies everyone in the channel and online' + defaultMessage: 'Notifies everyone in the channel and online', }]; }; @@ -232,10 +232,10 @@ export default class AtMention extends PureComponent { const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { listView: { - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, search: { - minHeight: 125 - } + minHeight: 125, + }, }; }); diff --git a/app/components/autocomplete/at_mention/index.js b/app/components/autocomplete/at_mention/index.js index 767797b61..afd6104c9 100644 --- a/app/components/autocomplete/at_mention/index.js +++ b/app/components/autocomplete/at_mention/index.js @@ -12,7 +12,7 @@ import { filterMembersInChannel, filterMembersNotInChannel, filterMembersInCurrentTeam, - getMatchTermForAtMention + getMatchTermForAtMention, } from 'app/selectors/autocomplete'; import {getTheme} from 'mattermost-redux/selectors/entities/preferences'; @@ -44,15 +44,15 @@ function mapStateToProps(state, ownProps) { inChannel, outChannel, requestStatus: state.requests.users.autocompleteUsers.status, - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - autocompleteUsers - }, dispatch) + autocompleteUsers, + }, dispatch), }; } diff --git a/app/components/autocomplete/at_mention_item/at_mention_item.js b/app/components/autocomplete/at_mention_item/at_mention_item.js index e68956549..8a3b0f092 100644 --- a/app/components/autocomplete/at_mention_item/at_mention_item.js +++ b/app/components/autocomplete/at_mention_item/at_mention_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Text, TouchableOpacity, - View + View, } from 'react-native'; import ProfilePicture from 'app/components/profile_picture'; @@ -19,7 +19,7 @@ export default class AtMentionItem extends PureComponent { onPress: PropTypes.func.isRequired, userId: PropTypes.string.isRequired, username: PropTypes.string, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; completeMention = () => { @@ -33,7 +33,7 @@ export default class AtMentionItem extends PureComponent { lastName, userId, username, - theme + theme, } = this.props; const style = getStyleFromTheme(theme); @@ -67,21 +67,21 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { paddingVertical: 8, flexDirection: 'row', alignItems: 'center', - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, rowPicture: { marginHorizontal: 8, width: 20, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, rowUsername: { fontSize: 13, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, rowFullname: { color: theme.centerChannelColor, - opacity: 0.6 - } + opacity: 0.6, + }, }; }); diff --git a/app/components/autocomplete/at_mention_item/index.js b/app/components/autocomplete/at_mention_item/index.js index 8df6bbebd..dcbde70a7 100644 --- a/app/components/autocomplete/at_mention_item/index.js +++ b/app/components/autocomplete/at_mention_item/index.js @@ -16,7 +16,7 @@ function mapStateToProps(state, ownProps) { firstName: user.first_name, lastName: user.last_name, username: user.username, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/autocomplete/autocomplete.js b/app/components/autocomplete/autocomplete.js index 400b06252..f0018490e 100644 --- a/app/components/autocomplete/autocomplete.js +++ b/app/components/autocomplete/autocomplete.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Keyboard, Platform, - View + View, } from 'react-native'; import DeviceInfo from 'react-native-device-info'; @@ -24,11 +24,11 @@ export default class Autocomplete extends PureComponent { rootId: PropTypes.string, isSearch: PropTypes.bool, theme: PropTypes.object.isRequired, - value: PropTypes.string + value: PropTypes.string, }; static defaultProps = { - isSearch: false + isSearch: false, }; state = { @@ -37,12 +37,12 @@ export default class Autocomplete extends PureComponent { channelMentionCount: 0, emojiCount: 0, commandCount: 0, - keyboardOffset: 0 + keyboardOffset: 0, }; handleSelectionChange = (event) => { this.setState({ - cursorPosition: event.nativeEvent.selection.end + cursorPosition: event.nativeEvent.selection.end, }); }; @@ -147,34 +147,34 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { left: 0, overflow: 'hidden', position: 'absolute', - right: 0 + right: 0, }, borders: { borderWidth: 1, borderColor: changeOpacity(theme.centerChannelColor, 0.2), - borderBottomWidth: 0 + borderBottomWidth: 0, }, bordersSearch: { borderWidth: 1, - borderColor: changeOpacity(theme.centerChannelColor, 0.2) + borderColor: changeOpacity(theme.centerChannelColor, 0.2), }, container: { bottom: 0, - maxHeight: 200 + maxHeight: 200, }, content: { - flex: 1 + flex: 1, }, searchContainer: { flex: 1, ...Platform.select({ android: { - top: 46 + top: 46, }, ios: { - top: 44 - } - }) - } + top: 44, + }, + }), + }, }; }); diff --git a/app/components/autocomplete/autocomplete_divider/autocomplete_divider.js b/app/components/autocomplete/autocomplete_divider/autocomplete_divider.js index e094d80e1..a587d3899 100644 --- a/app/components/autocomplete/autocomplete_divider/autocomplete_divider.js +++ b/app/components/autocomplete/autocomplete_divider/autocomplete_divider.js @@ -9,7 +9,7 @@ import {makeStyleSheetFromTheme, changeOpacity} from 'app/utils/theme'; export default class AutocompleteDivider extends PureComponent { static propTypes = { - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { @@ -26,7 +26,7 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { divider: { height: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.2) - } + backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), + }, }; }); diff --git a/app/components/autocomplete/autocomplete_divider/index.js b/app/components/autocomplete/autocomplete_divider/index.js index af4ab5d1b..752848995 100644 --- a/app/components/autocomplete/autocomplete_divider/index.js +++ b/app/components/autocomplete/autocomplete_divider/index.js @@ -9,7 +9,7 @@ import AutocompleteDivider from './autocomplete_divider'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/autocomplete/autocomplete_section_header.js b/app/components/autocomplete/autocomplete_section_header.js index a5c950d93..51ca3c4d8 100644 --- a/app/components/autocomplete/autocomplete_section_header.js +++ b/app/components/autocomplete/autocomplete_section_header.js @@ -12,7 +12,7 @@ export default class AutocompleteSectionHeader extends PureComponent { static propTypes = { defaultMessage: PropTypes.string.isRequired, id: PropTypes.string.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { @@ -40,15 +40,15 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { paddingLeft: 8, backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), borderTopWidth: 1, - borderTopColor: changeOpacity(theme.centerChannelColor, 0.2) + borderTopColor: changeOpacity(theme.centerChannelColor, 0.2), }, sectionText: { fontSize: 12, color: changeOpacity(theme.centerChannelColor, 0.7), - paddingVertical: 7 + paddingVertical: 7, }, sectionWrapper: { - backgroundColor: theme.centerChannelBg - } + backgroundColor: theme.centerChannelBg, + }, }; }); diff --git a/app/components/autocomplete/channel_mention/channel_mention.js b/app/components/autocomplete/channel_mention/channel_mention.js index 7bc862a10..0cc5a10ff 100644 --- a/app/components/autocomplete/channel_mention/channel_mention.js +++ b/app/components/autocomplete/channel_mention/channel_mention.js @@ -16,7 +16,7 @@ import {makeStyleSheetFromTheme} from 'app/utils/theme'; export default class ChannelMention extends PureComponent { static propTypes = { actions: PropTypes.shape({ - searchChannels: PropTypes.func.isRequired + searchChannels: PropTypes.func.isRequired, }).isRequired, currentTeamId: PropTypes.string.isRequired, cursorPosition: PropTypes.number.isRequired, @@ -31,19 +31,19 @@ export default class ChannelMention extends PureComponent { publicChannels: PropTypes.array, requestStatus: PropTypes.string.isRequired, theme: PropTypes.object.isRequired, - value: PropTypes.string + value: PropTypes.string, }; static defaultProps = { isSearch: false, - value: '' + value: '', }; constructor(props) { super(props); this.state = { - sections: [] + sections: [], }; } @@ -54,7 +54,7 @@ export default class ChannelMention extends PureComponent { // if the term changes but is null or the mention has been completed we render this component as null this.setState({ mentionComplete: false, - sections: [] + sections: [], }); this.props.onResultCountChange(0); @@ -83,7 +83,7 @@ export default class ChannelMention extends PureComponent { id: 'suggestion.search.public', defaultMessage: 'Public Channels', data: publicChannels, - key: 'publicChannels' + key: 'publicChannels', }); } @@ -92,7 +92,7 @@ export default class ChannelMention extends PureComponent { id: 'suggestion.search.private', defaultMessage: 'Private Channels', data: privateChannels, - key: 'privateChannels' + key: 'privateChannels', }); } } else { @@ -101,7 +101,7 @@ export default class ChannelMention extends PureComponent { id: 'suggestion.mention.channels', defaultMessage: 'My Channels', data: myChannels, - key: 'myChannels' + key: 'myChannels', }); } @@ -110,13 +110,13 @@ export default class ChannelMention extends PureComponent { id: 'suggestion.mention.morechannels', defaultMessage: 'Other Channels', data: otherChannels, - key: 'otherChannels' + key: 'otherChannels', }); } } this.setState({ - sections + sections, }); this.props.onResultCountChange(sections.reduce((total, section) => total + section.data.length, 0)); @@ -196,10 +196,10 @@ export default class ChannelMention extends PureComponent { const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { listView: { - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, search: { - minHeight: 125 - } + minHeight: 125, + }, }; }); diff --git a/app/components/autocomplete/channel_mention/index.js b/app/components/autocomplete/channel_mention/index.js index d7d1208ea..04ab84fd5 100644 --- a/app/components/autocomplete/channel_mention/index.js +++ b/app/components/autocomplete/channel_mention/index.js @@ -12,7 +12,7 @@ import { filterOtherChannels, filterPublicChannels, filterPrivateChannels, - getMatchTermForChannelMention + getMatchTermForChannelMention, } from 'app/selectors/autocomplete'; import {getTheme} from 'mattermost-redux/selectors/entities/preferences'; @@ -44,15 +44,15 @@ function mapStateToProps(state, ownProps) { currentTeamId: getCurrentTeamId(state), matchTerm, requestStatus: state.requests.channels.getChannels.status, - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - searchChannels - }, dispatch) + searchChannels, + }, dispatch), }; } diff --git a/app/components/autocomplete/channel_mention_item/channel_mention_item.js b/app/components/autocomplete/channel_mention_item/channel_mention_item.js index 75389c9dc..b76a44946 100644 --- a/app/components/autocomplete/channel_mention_item/channel_mention_item.js +++ b/app/components/autocomplete/channel_mention_item/channel_mention_item.js @@ -5,7 +5,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { Text, - TouchableOpacity + TouchableOpacity, } from 'react-native'; import {makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -16,7 +16,7 @@ export default class ChannelMentionItem extends PureComponent { displayName: PropTypes.string, name: PropTypes.string, onPress: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; completeMention = () => { @@ -29,7 +29,7 @@ export default class ChannelMentionItem extends PureComponent { channelId, displayName, name, - theme + theme, } = this.props; const style = getStyleFromTheme(theme); @@ -53,15 +53,15 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { padding: 8, flexDirection: 'row', alignItems: 'center', - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, rowDisplayName: { fontSize: 13, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, rowName: { color: theme.centerChannelColor, - opacity: 0.6 - } + opacity: 0.6, + }, }; }); diff --git a/app/components/autocomplete/channel_mention_item/index.js b/app/components/autocomplete/channel_mention_item/index.js index 67c9edf31..86708cdd3 100644 --- a/app/components/autocomplete/channel_mention_item/index.js +++ b/app/components/autocomplete/channel_mention_item/index.js @@ -15,7 +15,7 @@ function mapStateToProps(state, ownProps) { return { displayName: channel.display_name, name: channel.name, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/autocomplete/emoji_suggestion/emoji_suggestion.js b/app/components/autocomplete/emoji_suggestion/emoji_suggestion.js index 7fe3d82c0..1b08ac26c 100644 --- a/app/components/autocomplete/emoji_suggestion/emoji_suggestion.js +++ b/app/components/autocomplete/emoji_suggestion/emoji_suggestion.js @@ -7,7 +7,7 @@ import { FlatList, Text, TouchableOpacity, - View + View, } from 'react-native'; import {isMinimumServerVersion} from 'mattermost-redux/utils/helpers'; @@ -23,7 +23,7 @@ export default class EmojiSuggestion extends Component { static propTypes = { actions: PropTypes.shape({ addReactionToLatestPost: PropTypes.func.isRequired, - autocompleteCustomEmojis: PropTypes.func.isRequired + autocompleteCustomEmojis: PropTypes.func.isRequired, }).isRequired, cursorPosition: PropTypes.number, emojis: PropTypes.array.isRequired, @@ -34,17 +34,17 @@ export default class EmojiSuggestion extends Component { onResultCountChange: PropTypes.func.isRequired, rootId: PropTypes.string, value: PropTypes.string, - serverVersion: PropTypes.string + serverVersion: PropTypes.string, }; static defaultProps = { defaultChannel: {}, - value: '' + value: '', }; state = { active: false, - dataSource: [] + dataSource: [], }; constructor(props) { @@ -64,7 +64,7 @@ export default class EmojiSuggestion extends Component { if (!match || this.state.emojiComplete) { this.setState({ active: false, - emojiComplete: false + emojiComplete: false, }); this.props.onResultCountChange(0); @@ -118,7 +118,7 @@ export default class EmojiSuggestion extends Component { setEmojiData = (data) => { this.setState({ active: data.length > 0, - dataSource: data + dataSource: data, }); this.props.onResultCountChange(data.length); @@ -143,7 +143,7 @@ export default class EmojiSuggestion extends Component { this.setState({ active: false, - emojiComplete: true + emojiComplete: true, }); }; @@ -198,22 +198,22 @@ export default class EmojiSuggestion extends Component { const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { emoji: { - marginRight: 5 + marginRight: 5, }, emojiName: { fontSize: 13, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, listView: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, row: { height: 40, flexDirection: 'row', alignItems: 'center', paddingHorizontal: 8, - backgroundColor: theme.centerChannelBg - } + backgroundColor: theme.centerChannelBg, + }, }; }); diff --git a/app/components/autocomplete/emoji_suggestion/index.js b/app/components/autocomplete/emoji_suggestion/index.js index bde447f3e..553f046ce 100644 --- a/app/components/autocomplete/emoji_suggestion/index.js +++ b/app/components/autocomplete/emoji_suggestion/index.js @@ -35,7 +35,7 @@ function mapStateToProps(state) { location: 0, distance: 100, minMatchCharLength: 2, - maxPatternLength: 32 + maxPatternLength: 32, }; const emojis = getEmojisByName(state); @@ -46,7 +46,7 @@ function mapStateToProps(state) { fuse, emojis, theme: getTheme(state), - serverVersion: state.entities.general.serverVersion || Client4.getServerVersion() + serverVersion: state.entities.general.serverVersion || Client4.getServerVersion(), }; } @@ -54,8 +54,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ addReactionToLatestPost, - autocompleteCustomEmojis - }, dispatch) + autocompleteCustomEmojis, + }, dispatch), }; } diff --git a/app/components/autocomplete/index.js b/app/components/autocomplete/index.js index 1afa78e7c..635413551 100644 --- a/app/components/autocomplete/index.js +++ b/app/components/autocomplete/index.js @@ -13,7 +13,7 @@ function mapStateToProps(state) { const {deviceHeight} = getDimensions(state); return { deviceHeight, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/autocomplete/slash_suggestion/index.js b/app/components/autocomplete/slash_suggestion/index.js index 1da534017..080286c2e 100644 --- a/app/components/autocomplete/slash_suggestion/index.js +++ b/app/components/autocomplete/slash_suggestion/index.js @@ -30,15 +30,15 @@ function mapStateToProps(state) { commands: mobileCommandsSelector(state), commandsRequest: state.requests.integrations.getAutocompleteCommands, currentTeamId: getCurrentTeamId(state), - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - getAutocompleteCommands - }, dispatch) + getAutocompleteCommands, + }, dispatch), }; } diff --git a/app/components/autocomplete/slash_suggestion/slash_suggestion.js b/app/components/autocomplete/slash_suggestion/slash_suggestion.js index 4785c54d3..a6de87ae0 100644 --- a/app/components/autocomplete/slash_suggestion/slash_suggestion.js +++ b/app/components/autocomplete/slash_suggestion/slash_suggestion.js @@ -4,7 +4,7 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import { - FlatList + FlatList, } from 'react-native'; import {RequestStatus} from 'mattermost-redux/constants'; @@ -19,7 +19,7 @@ const TIME_BEFORE_NEXT_COMMAND_REQUEST = 1000 * 60 * 5; export default class SlashSuggestion extends Component { static propTypes = { actions: PropTypes.shape({ - getAutocompleteCommands: PropTypes.func.isRequired + getAutocompleteCommands: PropTypes.func.isRequired, }).isRequired, currentTeamId: PropTypes.string.isRequired, commands: PropTypes.array, @@ -28,19 +28,19 @@ export default class SlashSuggestion extends Component { theme: PropTypes.object.isRequired, onChangeText: PropTypes.func.isRequired, onResultCountChange: PropTypes.func.isRequired, - value: PropTypes.string + value: PropTypes.string, }; static defaultProps = { defaultChannel: {}, - value: '' + value: '', }; state = { active: false, suggestionComplete: false, dataSource: [], - lastCommandRequest: 0 + lastCommandRequest: 0, }; componentWillReceiveProps(nextProps) { @@ -53,12 +53,12 @@ export default class SlashSuggestion extends Component { commands: nextCommands, commandsRequest: nextCommandsRequest, currentTeamId: nextTeamId, - value: nextValue + value: nextValue, } = nextProps; if (currentTeamId !== nextTeamId) { this.setState({ - lastCommandRequest: 0 + lastCommandRequest: 0, }); } @@ -68,7 +68,7 @@ export default class SlashSuggestion extends Component { this.setState({ active: false, matchTerm: null, - suggestionComplete: false + suggestionComplete: false, }); this.props.onResultCountChange(0); return; @@ -79,7 +79,7 @@ export default class SlashSuggestion extends Component { if ((!nextCommands.length || dataIsStale) && nextCommandsRequest.status !== RequestStatus.STARTED) { this.props.actions.getAutocompleteCommands(nextProps.currentTeamId); this.setState({ - lastCommandRequest: Date.now() + lastCommandRequest: Date.now(), }); } @@ -89,7 +89,7 @@ export default class SlashSuggestion extends Component { this.setState({ active: data.length, - dataSource: data + dataSource: data, }); this.props.onResultCountChange(data.length); @@ -116,7 +116,7 @@ export default class SlashSuggestion extends Component { this.setState({ active: false, - suggestionComplete: true + suggestionComplete: true, }); }; @@ -161,7 +161,7 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { listView: { flex: 1, - backgroundColor: theme.centerChannelBg - } + backgroundColor: theme.centerChannelBg, + }, }; }); diff --git a/app/components/autocomplete/slash_suggestion/slash_suggestion_item.js b/app/components/autocomplete/slash_suggestion/slash_suggestion_item.js index d1bd52c52..ac3037067 100644 --- a/app/components/autocomplete/slash_suggestion/slash_suggestion_item.js +++ b/app/components/autocomplete/slash_suggestion/slash_suggestion_item.js @@ -5,7 +5,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { Text, - TouchableOpacity + TouchableOpacity, } from 'react-native'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -17,7 +17,7 @@ export default class SlashSuggestionItem extends PureComponent { hint: PropTypes.string, onPress: PropTypes.func.isRequired, theme: PropTypes.object.isRequired, - trigger: PropTypes.string + trigger: PropTypes.string, }; completeSuggestion = () => { @@ -31,7 +31,7 @@ export default class SlashSuggestionItem extends PureComponent { description, hint, theme, - trigger + trigger, } = this.props; const style = getStyleFromTheme(theme); @@ -60,24 +60,24 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { borderLeftWidth: 1, borderLeftColor: changeOpacity(theme.centerChannelColor, 0.2), borderRightWidth: 1, - borderRightColor: changeOpacity(theme.centerChannelColor, 0.2) + borderRightColor: changeOpacity(theme.centerChannelColor, 0.2), }, rowDisplayName: { fontSize: 13, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, rowName: { color: theme.centerChannelColor, - opacity: 0.6 + opacity: 0.6, }, suggestionDescription: { fontSize: 11, - color: changeOpacity(theme.centerChannelColor, 0.6) + color: changeOpacity(theme.centerChannelColor, 0.6), }, suggestionName: { fontSize: 13, color: theme.centerChannelColor, - marginBottom: 5 - } + marginBottom: 5, + }, }; }); diff --git a/app/components/autocomplete/special_mention_item.js b/app/components/autocomplete/special_mention_item.js index c74be2afa..ec1904a1a 100644 --- a/app/components/autocomplete/special_mention_item.js +++ b/app/components/autocomplete/special_mention_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Text, TouchableOpacity, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -20,7 +20,7 @@ export default class SpecialMentionItem extends PureComponent { id: PropTypes.string.isRequired, onPress: PropTypes.func.isRequired, theme: PropTypes.object.isRequired, - values: PropTypes.object + values: PropTypes.object, }; completeMention = () => { @@ -34,7 +34,7 @@ export default class SpecialMentionItem extends PureComponent { id, completeHandle, theme, - values + values, } = this.props; const style = getStyleFromTheme(theme); @@ -70,31 +70,31 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { paddingVertical: 8, flexDirection: 'row', alignItems: 'center', - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, rowPicture: { marginHorizontal: 8, width: 20, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, rowIcon: { color: changeOpacity(theme.centerChannelColor, 0.7), - fontSize: 14 + fontSize: 14, }, rowUsername: { fontSize: 13, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, rowFullname: { color: theme.centerChannelColor, flex: 1, - opacity: 0.6 + opacity: 0.6, }, textWrapper: { flex: 1, flexWrap: 'wrap', - paddingRight: 8 - } + paddingRight: 8, + }, }; }); diff --git a/app/components/badge.js b/app/components/badge.js index d5af6312b..df025736f 100644 --- a/app/components/badge.js +++ b/app/components/badge.js @@ -9,14 +9,14 @@ import { Text, TouchableWithoutFeedback, View, - ViewPropTypes + ViewPropTypes, } from 'react-native'; export default class Badge extends PureComponent { static defaultProps = { extraPaddingHorizontal: 10, minHeight: 0, - minWidth: 0 + minWidth: 0, }; static propTypes = { @@ -26,7 +26,7 @@ export default class Badge extends PureComponent { countStyle: Text.propTypes.style, minHeight: PropTypes.number, minWidth: PropTypes.number, - onPress: PropTypes.func + onPress: PropTypes.func, }; constructor(props) { @@ -42,7 +42,7 @@ export default class Badge extends PureComponent { onMoveShouldSetPanResponder: () => true, onStartShouldSetResponderCapture: () => true, onMoveShouldSetResponderCapture: () => true, - onResponderMove: () => false + onResponderMove: () => false, }); } @@ -87,8 +87,8 @@ export default class Badge extends PureComponent { style: { width, borderRadius, - opacity: 1 - } + opacity: 1, + }, }); this.layoutReady = true; } @@ -147,15 +147,15 @@ const styles = StyleSheet.create({ paddingBottom: 3, position: 'absolute', right: 30, - top: 2 + top: 2, }, wrapper: { alignItems: 'center', flex: 1, - justifyContent: 'center' + justifyContent: 'center', }, text: { fontSize: 14, - color: 'white' - } + color: 'white', + }, }); diff --git a/app/components/button.js b/app/components/button.js index 7fb783365..a1429c35f 100644 --- a/app/components/button.js +++ b/app/components/button.js @@ -11,19 +11,19 @@ import {GlobalStyles} from 'app/styles'; const styles = StyleSheet.create({ container: { flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, loading: { - marginLeft: 3 - } + marginLeft: 3, + }, }); export default class Button extends PureComponent { static propTypes = { children: PropTypes.node, loading: PropTypes.bool, - onPress: PropTypes.func.isRequired + onPress: PropTypes.func.isRequired, }; onPress = () => { diff --git a/app/components/channel_drawer/channel_drawer.js b/app/components/channel_drawer/channel_drawer.js index 49a3122d0..605a359c4 100644 --- a/app/components/channel_drawer/channel_drawer.js +++ b/app/components/channel_drawer/channel_drawer.js @@ -9,7 +9,7 @@ import { Keyboard, Platform, StyleSheet, - View + View, } from 'react-native'; import {General, WebsocketEvents} from 'mattermost-redux/constants'; @@ -29,7 +29,7 @@ const { ANDROID_TOP_LANDSCAPE, ANDROID_TOP_PORTRAIT, IOS_TOP_LANDSCAPE, - IOS_TOP_PORTRAIT + IOS_TOP_PORTRAIT, } = ViewTypes; const DRAWER_INITIAL_OFFSET = 40; const DRAWER_LANDSCAPE_OFFSET = 150; @@ -43,7 +43,7 @@ export default class ChannelDrawer extends Component { makeDirectChannel: PropTypes.func.isRequired, markChannelAsRead: PropTypes.func.isRequired, setChannelDisplayName: PropTypes.func.isRequired, - setChannelLoading: PropTypes.func.isRequired + setChannelLoading: PropTypes.func.isRequired, }).isRequired, blurPostTextBox: PropTypes.func.isRequired, children: PropTypes.node, @@ -54,7 +54,7 @@ export default class ChannelDrawer extends Component { intl: PropTypes.object.isRequired, navigator: PropTypes.object, teamsCount: PropTypes.number.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; closeHandle = null; @@ -69,7 +69,7 @@ export default class ChannelDrawer extends Component { openDrawerOffset = DRAWER_LANDSCAPE_OFFSET; } this.state = { - openDrawerOffset + openDrawerOffset, }; } @@ -175,12 +175,12 @@ export default class ChannelDrawer extends Component { mainOverlay: { backgroundColor: this.props.theme.centerChannelBg, elevation: 3, - opacity + opacity, }, drawerOverlay: { backgroundColor: ratio ? '#000' : '#FFF', - opacity: ratio ? (1 - ratio) / 2 : 1 - } + opacity: ratio ? (1 - ratio) / 2 : 1, + }, }; }; @@ -202,7 +202,7 @@ export default class ChannelDrawer extends Component { selectChannel = (channel, currentChannelId) => { const { - actions + actions, } = this.props; const { @@ -210,7 +210,7 @@ export default class ChannelDrawer extends Component { markChannelAsRead, setChannelLoading, setChannelDisplayName, - markChannelAsViewed + markChannelAsViewed, } = actions; tracker.channelSwitch = Date.now(); @@ -236,12 +236,12 @@ export default class ChannelDrawer extends Component { actions, currentTeamId, currentUserId, - intl + intl, } = this.props; const { joinChannel, - makeDirectChannel + makeDirectChannel, } = actions; const displayValue = {displayName: channel.display_name}; @@ -253,7 +253,7 @@ export default class ChannelDrawer extends Component { if (result.error) { const dmFailedMessage = { id: 'mobile.open_dm.error', - defaultMessage: "We couldn't open a direct message with {displayName}. Please check your connection and try again." + defaultMessage: "We couldn't open a direct message with {displayName}. Please check your connection and try again.", }; alertErrorWithFallback(intl, result.error, dmFailedMessage, displayValue); } @@ -263,7 +263,7 @@ export default class ChannelDrawer extends Component { if (result.error) { const joinFailedMessage = { id: 'mobile.join_channel.error', - defaultMessage: "We couldn't join the channel {displayName}. Please check your connection and try again." + defaultMessage: "We couldn't join the channel {displayName}. Please check your connection and try again.", }; alertErrorWithFallback(intl, result.error, joinFailedMessage, displayValue); } @@ -319,11 +319,11 @@ export default class ChannelDrawer extends Component { const { navigator, teamsCount, - theme + theme, } = this.props; const { - openDrawerOffset + openDrawerOffset, } = this.state; const multipleTeams = teamsCount > 1; @@ -428,9 +428,9 @@ export default class ChannelDrawer extends Component { shadowRadius: 12, shadowOffset: { width: -4, - height: 0 - } - } + height: 0, + }, + }, }} > {children} @@ -442,6 +442,6 @@ export default class ChannelDrawer extends Component { const style = StyleSheet.create({ swiperContent: { flex: 1, - marginBottom: 10 - } + marginBottom: 10, + }, }); diff --git a/app/components/channel_drawer/channels_list/channel_item/channel_item.js b/app/components/channel_drawer/channels_list/channel_item/channel_item.js index ab30d49b4..cde499db0 100644 --- a/app/components/channel_drawer/channels_list/channel_item/channel_item.js +++ b/app/components/channel_drawer/channels_list/channel_item/channel_item.js @@ -8,7 +8,7 @@ import { Platform, TouchableHighlight, Text, - View + View, } from 'react-native'; import {intlShape} from 'react-intl'; @@ -33,11 +33,11 @@ export default class ChannelItem extends PureComponent { status: PropTypes.string, teammateDeletedAt: PropTypes.number, type: PropTypes.string.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; onPress = wrapWithPreventDoubleTap(() => { @@ -58,11 +58,11 @@ export default class ChannelItem extends PureComponent { previewView: this.previewRef, previewActions: [{ id: 'action-mark-as-read', - title: intl.formatMessage({id: 'mobile.channel.markAsRead', defaultMessage: 'Mark As Read'}) + title: intl.formatMessage({id: 'mobile.channel.markAsRead', defaultMessage: 'Mark As Read'}), }], passProps: { - channelId - } + channelId, + }, }); } }; @@ -82,7 +82,7 @@ export default class ChannelItem extends PureComponent { status, teammateDeletedAt, theme, - type + type, } = this.props; const {intl} = this.context; @@ -91,7 +91,7 @@ export default class ChannelItem extends PureComponent { if (isMyUser) { channelDisplayName = intl.formatMessage({ id: 'channel_header.directchannel.you', - defaultMessage: '{displayName} (you)' + defaultMessage: '{displayName} (you)', }, {displayname: displayName}); } @@ -173,22 +173,22 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { container: { flex: 1, flexDirection: 'row', - height: 44 + height: 44, }, borderActive: { backgroundColor: theme.sidebarTextActiveBorder, - width: 5 + width: 5, }, item: { alignItems: 'center', height: 44, flex: 1, flexDirection: 'row', - paddingLeft: 16 + paddingLeft: 16, }, itemActive: { backgroundColor: changeOpacity(theme.sidebarTextActiveColor, 0.1), - paddingLeft: 11 + paddingLeft: 11, }, text: { color: changeOpacity(theme.sidebarText, 0.4), @@ -196,13 +196,13 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { fontSize: 14, fontWeight: '600', lineHeight: 16, - paddingRight: 40 + paddingRight: 40, }, textActive: { - color: theme.sidebarTextActiveColor + color: theme.sidebarTextActiveColor, }, textUnread: { - color: theme.sidebarUnreadText + color: theme.sidebarUnreadText, }, badge: { backgroundColor: theme.mentionBj, @@ -211,11 +211,11 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderWidth: 1, padding: 3, position: 'relative', - right: 16 + right: 16, }, mention: { color: theme.mentionColor, - fontSize: 10 - } + fontSize: 10, + }, }; }); diff --git a/app/components/channel_drawer/channels_list/channel_item/index.js b/app/components/channel_drawer/channels_list/channel_item/index.js index 9515a41f9..5831c5e00 100644 --- a/app/components/channel_drawer/channels_list/channel_item/index.js +++ b/app/components/channel_drawer/channels_list/channel_item/index.js @@ -40,7 +40,7 @@ function makeMapStateToProps() { status: channel.status, teammateDeletedAt, theme: getTheme(state), - type: channel.type + type: channel.type, }; }; } diff --git a/app/components/channel_drawer/channels_list/channels_list.js b/app/components/channel_drawer/channels_list/channels_list.js index a8061dd37..1dfdc8cfa 100644 --- a/app/components/channel_drawer/channels_list/channels_list.js +++ b/app/components/channel_drawer/channels_list/channels_list.js @@ -5,7 +5,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Platform, - View + View, } from 'react-native'; import {injectIntl, intlShape} from 'react-intl'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; @@ -29,7 +29,7 @@ class ChannelsList extends React.PureComponent { onSearchStart: PropTypes.func.isRequired, onSelectChannel: PropTypes.func.isRequired, onShowTeams: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; constructor(props) { @@ -37,7 +37,7 @@ class ChannelsList extends React.PureComponent { this.state = { searching: false, - term: '' + term: '', }; MaterialIcon.getImageSource('close', 20, this.props.theme.sidebarHeaderTextColor).then((source) => { @@ -77,7 +77,7 @@ class ChannelsList extends React.PureComponent { intl, navigator, onShowTeams, - theme + theme, } = this.props; const {searching, term} = this.state; @@ -108,9 +108,9 @@ class ChannelsList extends React.PureComponent { fontSize: 15, ...Platform.select({ android: { - marginBottom: -5 - } - }) + marginBottom: -5, + }, + }), }; const title = ( @@ -161,10 +161,10 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { backgroundColor: theme.sidebarBg, - flex: 1 + flex: 1, }, statusBar: { - backgroundColor: theme.sidebarHeaderBg + backgroundColor: theme.sidebarHeaderBg, }, headerContainer: { alignItems: 'center', @@ -175,30 +175,30 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderBottomColor: changeOpacity(theme.sidebarHeaderTextColor, 0.10), ...Platform.select({ android: { - height: ANDROID_TOP_PORTRAIT + height: ANDROID_TOP_PORTRAIT, }, ios: { - height: 44 - } - }) + height: 44, + }, + }), }, header: { color: theme.sidebarHeaderTextColor, flex: 1, fontSize: 17, fontWeight: 'normal', - paddingLeft: 16 + paddingLeft: 16, }, switchContainer: { position: 'relative', - top: -1 + top: -1, }, titleContainer: { // These aren't used by this component, but they are passed down to the list component alignItems: 'center', flex: 1, flexDirection: 'row', height: 48, - marginLeft: 16 + marginLeft: 16, }, title: { flex: 1, @@ -207,40 +207,40 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { fontSize: 15, fontWeight: '400', letterSpacing: 0.8, - lineHeight: 18 + lineHeight: 18, }, searchContainer: { flex: 1, paddingRight: 10, ...Platform.select({ android: { - marginBottom: 1 + marginBottom: 1, }, ios: { - marginBottom: 3 - } - }) + marginBottom: 3, + }, + }), }, divider: { backgroundColor: changeOpacity(theme.sidebarText, 0.1), - height: 1 + height: 1, }, actionContainer: { alignItems: 'center', height: 48, justifyContent: 'center', - width: 50 + width: 50, }, action: { color: theme.sidebarText, fontSize: 20, fontWeight: '500', - lineHeight: 18 + lineHeight: 18, }, above: { backgroundColor: theme.mentionBj, - top: 9 - } + top: 9, + }, }; }); diff --git a/app/components/channel_drawer/channels_list/filtered_list/filtered_list.js b/app/components/channel_drawer/channels_list/filtered_list/filtered_list.js index bcf7e13ba..5d87373d5 100644 --- a/app/components/channel_drawer/channels_list/filtered_list/filtered_list.js +++ b/app/components/channel_drawer/channels_list/filtered_list/filtered_list.js @@ -8,7 +8,7 @@ import { FlatList, Text, TouchableHighlight, - View + View, } from 'react-native'; import {injectIntl, intlShape} from 'react-intl'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; @@ -30,7 +30,7 @@ class FilteredList extends Component { getProfilesInTeam: PropTypes.func.isRequired, makeGroupMessageVisibleIfNecessary: PropTypes.func.isRequired, searchChannels: PropTypes.func.isRequired, - searchProfiles: PropTypes.func.isRequired + searchProfiles: PropTypes.func.isRequired, }).isRequired, channels: PropTypes.object.isRequired, currentTeam: PropTypes.object.isRequired, @@ -49,19 +49,19 @@ class FilteredList extends Component { statuses: PropTypes.object, styles: PropTypes.object.isRequired, term: PropTypes.string, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { currentTeam: {}, currentChannel: {}, - pastDirectMessages: [] + pastDirectMessages: [], }; constructor(props) { super(props); this.state = { - dataSource: this.buildData(props) + dataSource: this.buildData(props), }; } @@ -146,28 +146,28 @@ class FilteredList extends Component { unreads: { builder: this.buildUnreadChannelsForSearch, id: 'mobile.channel_list.unreads', - defaultMessage: 'UNREADS' + defaultMessage: 'UNREADS', }, channels: { builder: this.buildChannelsForSearch, id: 'mobile.channel_list.channels', - defaultMessage: 'CHANNELS' + defaultMessage: 'CHANNELS', }, dms: { builder: this.buildCurrentDMSForSearch, id: 'sidebar.direct', - defaultMessage: 'DIRECT MESSAGES' + defaultMessage: 'DIRECT MESSAGES', }, members: { builder: this.buildMembersForSearch, id: 'mobile.channel_list.members', - defaultMessage: 'MEMBERS' + defaultMessage: 'MEMBERS', }, nonmembers: { builder: this.buildOtherMembersForSearch, id: 'mobile.channel_list.not_member', - defaultMessage: 'NOT A MEMBER' - } + defaultMessage: 'NOT A MEMBER', + }, }); buildUnreadChannelsForSearch = (props, term) => { @@ -212,14 +212,14 @@ class FilteredList extends Component { type: General.DM_CHANNEL, fake: true, nickname: u.nickname, - fullname: `${u.first_name} ${u.last_name}` + fullname: `${u.first_name} ${u.last_name}`, }; }); groupChannels = groupChannels.map((channel) => { return { ...channel, - ...groupChannelMemberDetails[channel.id] + ...groupChannelMemberDetails[channel.id], }; }); @@ -253,7 +253,7 @@ class FilteredList extends Component { type: General.DM_CHANNEL, fake: true, nickname: u.nickname, - fullname: `${u.first_name} ${u.last_name}` + fullname: `${u.first_name} ${u.last_name}`, }; }); @@ -266,7 +266,7 @@ class FilteredList extends Component { const { favoriteChannels, publicChannels, - privateChannels + privateChannels, } = props.channels; const favorites = favoriteChannels.filter((c) => { @@ -283,7 +283,7 @@ class FilteredList extends Component { const notMemberOf = otherChannels.map((o) => { return { ...o, - fake: true + fake: true, }; }); @@ -369,7 +369,7 @@ class FilteredList extends Component { {bottomDivider && this.renderDivider(styles, 16)} - ) + ), }; }; diff --git a/app/components/channel_drawer/channels_list/filtered_list/index.js b/app/components/channel_drawer/channels_list/filtered_list/index.js index 3e5a74691..ac8fba2bd 100644 --- a/app/components/channel_drawer/channels_list/filtered_list/index.js +++ b/app/components/channel_drawer/channels_list/filtered_list/index.js @@ -13,7 +13,7 @@ import { getChannelsWithUnreadSection, getCurrentChannel, getGroupChannels, - getOtherChannels + getOtherChannels, } from 'mattermost-redux/selectors/entities/channels'; import {getConfig} from 'mattermost-redux/selectors/entities/general'; import {getCurrentUserId, getProfilesInCurrentTeam, getUsers, getUserIdsInChannels, getUserStatuses} from 'mattermost-redux/selectors/entities/users'; @@ -72,14 +72,14 @@ function getGroupDetails(currentUserId, userIdsInChannels, profiles, groupChanne email: [], fullname: [], nickname: [], - username: [] + username: [], }); groupMemberDetails[channel.id] = { email: members.email.join(','), fullname: members.fullname.join(','), nickname: members.nickname.join(','), - username: members.username.join(',') + username: members.username.join(','), }; return groupMemberDetails; @@ -119,7 +119,7 @@ function mapStateToProps(state) { searchOrder, pastDirectMessages: pastDirectMessages(state), restrictDms, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -129,8 +129,8 @@ function mapDispatchToProps(dispatch) { getProfilesInTeam, makeGroupMessageVisibleIfNecessary, searchChannels, - searchProfiles - }, dispatch) + searchProfiles, + }, dispatch), }; } diff --git a/app/components/channel_drawer/channels_list/index.js b/app/components/channel_drawer/channels_list/index.js index 65f1cb47b..a8fe78590 100644 --- a/app/components/channel_drawer/channels_list/index.js +++ b/app/components/channel_drawer/channels_list/index.js @@ -9,7 +9,7 @@ import ChannelsList from './channels_list'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/channel_drawer/channels_list/list/index.js b/app/components/channel_drawer/channels_list/list/index.js index 1e56abfbb..473b4549c 100644 --- a/app/components/channel_drawer/channels_list/list/index.js +++ b/app/components/channel_drawer/channels_list/list/index.js @@ -9,7 +9,7 @@ import { getSortedFavoriteChannelIds, getSortedPublicChannelIds, getSortedPrivateChannelIds, - getSortedDirectChannelIds + getSortedDirectChannelIds, } from 'mattermost-redux/selectors/entities/channels'; import {getCurrentUserId, getCurrentUserRoles} from 'mattermost-redux/selectors/entities/users'; import {getTheme, getFavoritesPreferences} from 'mattermost-redux/selectors/entities/preferences'; @@ -34,7 +34,7 @@ function mapStateToProps(state) { publicChannelIds, privateChannelIds, directChannelIds, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/channel_drawer/channels_list/list/list.js b/app/components/channel_drawer/channels_list/list/list.js index 4125a5801..74879845c 100644 --- a/app/components/channel_drawer/channels_list/list/list.js +++ b/app/components/channel_drawer/channels_list/list/list.js @@ -8,7 +8,7 @@ import { SectionList, Text, TouchableHighlight, - View + View, } from 'react-native'; import {intlShape} from 'react-intl'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; @@ -24,7 +24,7 @@ import {changeOpacity} from 'app/utils/theme'; const VIEWABILITY_CONFIG = { ...ListTypes.VISIBILITY_CONFIG_DEFAULTS, - waitForInteraction: true + waitForInteraction: true, }; export default class List extends PureComponent { @@ -38,11 +38,11 @@ export default class List extends PureComponent { privateChannelIds: PropTypes.array.isRequired, styles: PropTypes.object.isRequired, theme: PropTypes.object.isRequired, - unreadChannelIds: PropTypes.array.isRequired + unreadChannelIds: PropTypes.array.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props) { @@ -51,7 +51,7 @@ export default class List extends PureComponent { this.state = { sections: this.buildSections(props), showIndicator: false, - width: 0 + width: 0, }; MaterialIcon.getImageSource('close', 20, this.props.theme.sidebarHeaderTextColor).then((source) => { @@ -66,7 +66,7 @@ export default class List extends PureComponent { favoriteChannelIds, publicChannelIds, privateChannelIds, - unreadChannelIds + unreadChannelIds, } = this.props; if (nextProps.canCreatePrivateChannels !== canCreatePrivateChannels || @@ -93,7 +93,7 @@ export default class List extends PureComponent { favoriteChannelIds, publicChannelIds, privateChannelIds, - unreadChannelIds + unreadChannelIds, } = props; const sections = []; @@ -104,7 +104,7 @@ export default class List extends PureComponent { data: unreadChannelIds, renderItem: this.renderUnreadItem, topSeparator: false, - bottomSeparator: true + bottomSeparator: true, }); } @@ -114,7 +114,7 @@ export default class List extends PureComponent { defaultMessage: 'FAVORITES', data: favoriteChannelIds, topSeparator: unreadChannelIds.length > 0, - bottomSeparator: true + bottomSeparator: true, }); } @@ -124,7 +124,7 @@ export default class List extends PureComponent { defaultMessage: 'PUBLIC CHANNELS', data: publicChannelIds, topSeparator: favoriteChannelIds.length > 0 || unreadChannelIds.length > 0, - bottomSeparator: publicChannelIds.length > 0 + bottomSeparator: publicChannelIds.length > 0, }); sections.push({ @@ -133,7 +133,7 @@ export default class List extends PureComponent { defaultMessage: 'PRIVATE CHANNELS', data: privateChannelIds, topSeparator: true, - bottomSeparator: privateChannelIds.length > 0 + bottomSeparator: privateChannelIds.length > 0, }); sections.push({ @@ -142,7 +142,7 @@ export default class List extends PureComponent { defaultMessage: 'DIRECT MESSAGES', data: directChannelIds, topSeparator: true, - bottomSeparator: directChannelIds.length > 0 + bottomSeparator: directChannelIds.length > 0, }); return sections; @@ -162,12 +162,12 @@ export default class List extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { channelType: General.PRIVATE_CHANNEL, - closeButton: this.closeButton - } + closeButton: this.closeButton, + }, }); }); @@ -185,14 +185,14 @@ export default class List extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, navigatorButtons: { leftButtons: [{ id: 'close-dms', - icon: this.closeButton - }] - } + icon: this.closeButton, + }], + }, }); }); @@ -210,11 +210,11 @@ export default class List extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { - closeButton: this.closeButton - } + closeButton: this.closeButton, + }, }); }); @@ -282,7 +282,7 @@ export default class List extends PureComponent { bottomSeparator, defaultMessage, id, - topSeparator + topSeparator, } = section; return ( @@ -304,7 +304,7 @@ export default class List extends PureComponent { this.refs.list._wrapperListRef.getListRef().scrollToOffset({ //eslint-disable-line no-underscore-dangle x: 0, y: 0, - animated: true + animated: true, }); } }; diff --git a/app/components/channel_drawer/channels_list/switch_teams_button/index.js b/app/components/channel_drawer/channels_list/switch_teams_button/index.js index d50262ce0..08008ef06 100644 --- a/app/components/channel_drawer/channels_list/switch_teams_button/index.js +++ b/app/components/channel_drawer/channels_list/switch_teams_button/index.js @@ -16,7 +16,7 @@ function mapStateToProps(state) { displayName: team.display_name, mentionCount: getChannelDrawerBadgeCount(state), teamsCount: getMyTeamsCount(state), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/channel_drawer/channels_list/switch_teams_button/switch_teams_button.js b/app/components/channel_drawer/channels_list/switch_teams_button/switch_teams_button.js index d25accc09..558c69f37 100644 --- a/app/components/channel_drawer/channels_list/switch_teams_button/switch_teams_button.js +++ b/app/components/channel_drawer/channels_list/switch_teams_button/switch_teams_button.js @@ -6,7 +6,7 @@ import React from 'react'; import { Text, TouchableHighlight, - View + View, } from 'react-native'; import AwesomeIcon from 'react-native-vector-icons/FontAwesome'; @@ -22,7 +22,7 @@ export default class SwitchTeamsButton extends React.PureComponent { onShowTeams: PropTypes.func.isRequired, mentionCount: PropTypes.number.isRequired, teamsCount: PropTypes.number.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; showTeams = wrapWithPreventDoubleTap(() => { @@ -36,7 +36,7 @@ export default class SwitchTeamsButton extends React.PureComponent { mentionCount, searching, teamsCount, - theme + theme, } = this.props; if (!currentTeamId) { @@ -94,18 +94,18 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { justifyContent: 'center', marginLeft: 6, marginRight: 5, - paddingHorizontal: 6 + paddingHorizontal: 6, }, switcherDivider: { backgroundColor: theme.sidebarHeaderBg, height: 15, marginHorizontal: 6, - width: 1 + width: 1, }, switcherTeam: { color: theme.sidebarHeaderBg, fontFamily: 'OpenSans', - fontSize: 14 + fontSize: 14, }, badge: { backgroundColor: theme.mentionBj, @@ -116,11 +116,11 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { padding: 3, position: 'absolute', left: -5, - top: -5 + top: -5, }, mention: { color: theme.mentionColor, - fontSize: 10 - } + fontSize: 10, + }, }; }); diff --git a/app/components/channel_drawer/channels_list/unread_indicator/index.js b/app/components/channel_drawer/channels_list/unread_indicator/index.js index d247117af..60378fc46 100644 --- a/app/components/channel_drawer/channels_list/unread_indicator/index.js +++ b/app/components/channel_drawer/channels_list/unread_indicator/index.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { TouchableWithoutFeedback, View, - ViewPropTypes + ViewPropTypes, } from 'react-native'; import IonIcon from 'react-native-vector-icons/Ionicons'; @@ -18,11 +18,11 @@ export default class UnreadIndicator extends PureComponent { show: PropTypes.bool, style: ViewPropTypes.style, onPress: PropTypes.func, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - onPress: () => true + onPress: () => true, }; render() { @@ -65,7 +65,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { position: 'absolute', borderRadius: 15, marginHorizontal: 15, - height: 25 + height: 25, }, indicatorText: { backgroundColor: 'transparent', @@ -74,11 +74,11 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { paddingVertical: 2, paddingHorizontal: 4, textAlign: 'center', - textAlignVertical: 'center' + textAlignVertical: 'center', }, arrow: { position: 'relative', - bottom: -1 - } + bottom: -1, + }, }; }); diff --git a/app/components/channel_drawer/drawer_swipper/drawer_swiper.js b/app/components/channel_drawer/drawer_swipper/drawer_swiper.js index 9b25ecc9f..94aab311c 100644 --- a/app/components/channel_drawer/drawer_swipper/drawer_swiper.js +++ b/app/components/channel_drawer/drawer_swipper/drawer_swiper.js @@ -16,12 +16,12 @@ export default class DrawerSwiper extends Component { onPageSelected: PropTypes.func, openDrawerOffset: PropTypes.number, showTeams: PropTypes.bool.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { onPageSelected: () => true, - openDrawerOffset: 0 + openDrawerOffset: 0, }; shouldComponentUpdate(nextProps) { @@ -64,7 +64,7 @@ export default class DrawerSwiper extends Component { deviceWidth, openDrawerOffset, showTeams, - theme + theme, } = this.props; const initialPage = React.Children.count(children) - 1; @@ -92,6 +92,6 @@ export default class DrawerSwiper extends Component { const style = StyleSheet.create({ pagination: { bottom: 0, - position: 'absolute' - } + position: 'absolute', + }, }); diff --git a/app/components/channel_drawer/drawer_swipper/index.js b/app/components/channel_drawer/drawer_swipper/index.js index f637d5c97..df55ae99d 100644 --- a/app/components/channel_drawer/drawer_swipper/index.js +++ b/app/components/channel_drawer/drawer_swipper/index.js @@ -12,7 +12,7 @@ import DraweSwiper from './drawer_swiper'; function mapStateToProps(state) { return { ...getDimensions(state), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/channel_drawer/index.js b/app/components/channel_drawer/index.js index f3f01faaa..e0df094d8 100644 --- a/app/components/channel_drawer/index.js +++ b/app/components/channel_drawer/index.js @@ -24,7 +24,7 @@ function mapStateToProps(state) { isLandscape: isLandscape(state), isTablet: isTablet(state), teamsCount: getMyTeamsCount(state), - theme: getTheme(state) + theme: getTheme(state), }; } @@ -38,8 +38,8 @@ function mapDispatchToProps(dispatch) { makeDirectChannel, markChannelAsRead, setChannelDisplayName, - setChannelLoading - }, dispatch) + setChannelLoading, + }, dispatch), }; } diff --git a/app/components/channel_drawer/teams_list/index.js b/app/components/channel_drawer/teams_list/index.js index cbf59f594..d6582e635 100644 --- a/app/components/channel_drawer/teams_list/index.js +++ b/app/components/channel_drawer/teams_list/index.js @@ -22,15 +22,15 @@ function mapStateToProps(state) { currentTeamId: getCurrentTeamId(state), currentUrl: removeProtocol(getCurrentUrl(state)), teamIds: getMySortedTeamIds(state, locale), - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - handleTeamChange - }, dispatch) + handleTeamChange, + }, dispatch), }; } diff --git a/app/components/channel_drawer/teams_list/teams_list.js b/app/components/channel_drawer/teams_list/teams_list.js index 55b4374a0..85441180b 100644 --- a/app/components/channel_drawer/teams_list/teams_list.js +++ b/app/components/channel_drawer/teams_list/teams_list.js @@ -9,7 +9,7 @@ import { StatusBar, Text, TouchableHighlight, - View + View, } from 'react-native'; import {injectIntl, intlShape} from 'react-intl'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; @@ -25,13 +25,13 @@ import TeamsListItem from './teams_list_item'; const {ANDROID_TOP_PORTRAIT} = ViewTypes; const VIEWABILITY_CONFIG = { ...ListTypes.VISIBILITY_CONFIG_DEFAULTS, - waitForInteraction: true + waitForInteraction: true, }; class TeamsList extends PureComponent { static propTypes = { actions: PropTypes.shape({ - handleTeamChange: PropTypes.func.isRequired + handleTeamChange: PropTypes.func.isRequired, }).isRequired, canJoinOtherTeams: PropTypes.bool.isRequired, closeChannelDrawer: PropTypes.func.isRequired, @@ -40,7 +40,7 @@ class TeamsList extends PureComponent { intl: intlShape.isRequired, navigator: PropTypes.object.isRequired, teamIds: PropTypes.array.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; constructor(props) { @@ -77,18 +77,18 @@ class TeamsList extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, navigatorButtons: { leftButtons: [{ id: 'close-teams', - icon: this.closeButton - }] + icon: this.closeButton, + }], }, passProps: { currentUrl, - theme - } + theme, + }, }); }); @@ -153,10 +153,10 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { backgroundColor: theme.sidebarBg, - flex: 1 + flex: 1, }, statusBar: { - backgroundColor: theme.sidebarHeaderBg + backgroundColor: theme.sidebarHeaderBg, }, headerContainer: { alignItems: 'center', @@ -166,19 +166,19 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderBottomColor: changeOpacity(theme.sidebarHeaderTextColor, 0.10), ...Platform.select({ android: { - height: ANDROID_TOP_PORTRAIT + height: ANDROID_TOP_PORTRAIT, }, ios: { - height: 44 - } - }) + height: 44, + }, + }), }, header: { color: theme.sidebarHeaderTextColor, flex: 1, fontSize: 17, textAlign: 'center', - fontWeight: '600' + fontWeight: '600', }, moreActionContainer: { alignItems: 'center', @@ -186,17 +186,17 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { width: 50, ...Platform.select({ android: { - height: ANDROID_TOP_PORTRAIT + height: ANDROID_TOP_PORTRAIT, }, ios: { - height: 44 - } - }) + height: 44, + }, + }), }, moreAction: { color: theme.sidebarHeaderTextColor, - fontSize: 30 - } + fontSize: 30, + }, }; }); diff --git a/app/components/channel_drawer/teams_list/teams_list_item/index.js b/app/components/channel_drawer/teams_list/teams_list_item/index.js index 97393fa35..005dc3de0 100644 --- a/app/components/channel_drawer/teams_list/teams_list_item/index.js +++ b/app/components/channel_drawer/teams_list/teams_list_item/index.js @@ -23,7 +23,7 @@ function makeMapStateToProps() { displayName: team.display_name, mentionCount: getMentionCount(state, ownProps.teamId), name: team.name, - theme: getTheme(state) + theme: getTheme(state), }; }; } diff --git a/app/components/channel_drawer/teams_list/teams_list_item/teams_list_item.js b/app/components/channel_drawer/teams_list/teams_list_item/teams_list_item.js index 69dd55537..2cc024fe9 100644 --- a/app/components/channel_drawer/teams_list/teams_list_item/teams_list_item.js +++ b/app/components/channel_drawer/teams_list/teams_list_item/teams_list_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Text, TouchableHighlight, - View + View, } from 'react-native'; import IonIcon from 'react-native-vector-icons/Ionicons'; @@ -23,7 +23,7 @@ export default class TeamsListItem extends React.PureComponent { name: PropTypes.string.isRequired, selectTeam: PropTypes.func.isRequired, teamId: PropTypes.string.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; selectTeam = wrapWithPreventDoubleTap(() => { @@ -38,7 +38,7 @@ export default class TeamsListItem extends React.PureComponent { mentionCount, name, teamId, - theme + theme, } = this.props; const styles = getStyleSheet(theme); @@ -104,13 +104,13 @@ export default class TeamsListItem extends React.PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { teamWrapper: { - marginTop: 20 + marginTop: 20, }, teamContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - marginHorizontal: 16 + marginHorizontal: 16, }, teamIconContainer: { alignItems: 'center', @@ -118,33 +118,33 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderRadius: 2, height: 40, justifyContent: 'center', - width: 40 + width: 40, }, teamIcon: { color: theme.sidebarBg, fontFamily: 'OpenSans', fontSize: 18, - fontWeight: '600' + fontWeight: '600', }, teamNameContainer: { flex: 1, flexDirection: 'column', - marginLeft: 10 + marginLeft: 10, }, teamName: { color: theme.sidebarText, - fontSize: 18 + fontSize: 18, }, teamUrl: { color: changeOpacity(theme.sidebarText, 0.5), - fontSize: 12 + fontSize: 12, }, checkmarkContainer: { - alignItems: 'flex-end' + alignItems: 'flex-end', }, checkmark: { color: theme.sidebarText, - fontSize: 20 + fontSize: 20, }, badge: { backgroundColor: theme.mentionBj, @@ -155,11 +155,11 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { padding: 3, position: 'absolute', left: 45, - top: -7.5 + top: -7.5, }, mention: { color: theme.mentionColor, - fontSize: 10 - } + fontSize: 10, + }, }; }); diff --git a/app/components/channel_icon.js b/app/components/channel_icon.js index ff4585d7f..244c61bc1 100644 --- a/app/components/channel_icon.js +++ b/app/components/channel_icon.js @@ -5,7 +5,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Text, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -14,7 +14,7 @@ import { AwayAvatar, DndAvatar, OfflineAvatar, - OnlineAvatar + OnlineAvatar, } from 'app/components/status_icons'; import {General} from 'mattermost-redux/constants'; @@ -31,14 +31,14 @@ export default class ChannelIcon extends React.PureComponent { status: PropTypes.string, teammateDeletedAt: PropTypes.number, theme: PropTypes.object.isRequired, - type: PropTypes.string.isRequired + type: PropTypes.string.isRequired, }; static defaultProps = { isActive: false, isInfo: false, isUnread: false, - size: 12 + size: 12, }; render() { @@ -51,7 +51,7 @@ export default class ChannelIcon extends React.PureComponent { status, teammateDeletedAt, theme, - type + type, } = this.props; const style = getStyleSheet(theme); @@ -167,49 +167,49 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { marginRight: 12, - alignItems: 'center' + alignItems: 'center', }, icon: { - color: changeOpacity(theme.sidebarText, 0.4) + color: changeOpacity(theme.sidebarText, 0.4), }, iconActive: { - color: theme.sidebarTextActiveColor + color: theme.sidebarTextActiveColor, }, iconUnread: { - color: theme.sidebarUnreadText + color: theme.sidebarUnreadText, }, iconInfo: { - color: theme.centerChannelColor + color: theme.centerChannelColor, }, groupBox: { alignSelf: 'flex-start', alignItems: 'center', borderWidth: 1, borderColor: changeOpacity(theme.sidebarText, 0.4), - justifyContent: 'center' + justifyContent: 'center', }, groupBoxActive: { - borderColor: theme.sidebarTextActiveColor + borderColor: theme.sidebarTextActiveColor, }, groupBoxUnread: { - borderColor: theme.sidebarUnreadText + borderColor: theme.sidebarUnreadText, }, groupBoxInfo: { - borderColor: theme.centerChannelColor + borderColor: theme.centerChannelColor, }, group: { color: changeOpacity(theme.sidebarText, 0.4), fontSize: 10, - fontWeight: '600' + fontWeight: '600', }, groupActive: { - color: theme.sidebarTextActiveColor + color: theme.sidebarTextActiveColor, }, groupUnread: { - color: theme.sidebarUnreadText + color: theme.sidebarUnreadText, }, groupInfo: { - color: theme.centerChannelColor - } + color: theme.centerChannelColor, + }, }; }); diff --git a/app/components/channel_intro/channel_intro.js b/app/components/channel_intro/channel_intro.js index 993801e5a..5f8f2d8b4 100644 --- a/app/components/channel_intro/channel_intro.js +++ b/app/components/channel_intro/channel_intro.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Text, TouchableOpacity, - View + View, } from 'react-native'; import {getFullName} from 'mattermost-redux/utils/user_utils'; import {General} from 'mattermost-redux/constants'; @@ -25,7 +25,7 @@ class ChannelIntro extends PureComponent { intl: intlShape.isRequired, isLoadingPosts: PropTypes.bool, navigator: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; goToUserProfile = (userId) => { @@ -37,14 +37,14 @@ class ChannelIntro extends PureComponent { animated: true, backButtonTitle: '', passProps: { - userId + userId, }, navigatorStyle: { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }; @@ -109,9 +109,9 @@ class ChannelIntro extends PureComponent { {intl.formatMessage({ id: 'mobile.intro_messages.DM', - defaultMessage: 'This is the start of your direct message history with {teammate}. Direct messages and files shared here are not shown to people outside this area.' + defaultMessage: 'This is the start of your direct message history with {teammate}. Direct messages and files shared here are not shown to people outside this area.', }, { - teammate + teammate, })} ); @@ -128,7 +128,7 @@ class ChannelIntro extends PureComponent { {intl.formatMessage({ id: 'intro_messages.group_message', - defaultMessage: 'This is the start of your group message history with these teammates. Messages and files shared here are not shown to people outside this area.' + defaultMessage: 'This is the start of your group message history with these teammates. Messages and files shared here are not shown to people outside this area.', })} ); @@ -141,7 +141,7 @@ class ChannelIntro extends PureComponent { const date = intl.formatDate(currentChannel.create_at, { year: 'numeric', month: 'long', - day: 'numeric' + day: 'numeric', }); let mainMessageIntl; @@ -156,9 +156,9 @@ class ChannelIntro extends PureComponent { date, type: intl.formatMessage({ id: 'intro_messages.channel', - defaultMessage: 'channel' - }) - } + defaultMessage: 'channel', + }), + }, }; } else { mainMessageIntl = { @@ -169,20 +169,20 @@ class ChannelIntro extends PureComponent { date, type: intl.formatMessage({ id: 'intro_messages.channel', - defaultMessage: 'channel' - }) - } + defaultMessage: 'channel', + }), + }, }; } const mainMessage = intl.formatMessage({ id: mainMessageIntl.id, - defaultMessage: mainMessageIntl.defaultMessage + defaultMessage: mainMessageIntl.defaultMessage, }, mainMessageIntl.values); const anyMemberMessage = intl.formatMessage({ id: 'intro_messages.anyMember', - defaultMessage: ' Any member can join and read this channel.' + defaultMessage: ' Any member can join and read this channel.', }); return ( @@ -190,9 +190,9 @@ class ChannelIntro extends PureComponent { {intl.formatMessage({ id: 'intro_messages.beginning', - defaultMessage: 'Beginning of {name}' + defaultMessage: 'Beginning of {name}', }, { - name: currentChannel.display_name + name: currentChannel.display_name, })} @@ -210,25 +210,25 @@ class ChannelIntro extends PureComponent { const date = intl.formatDate(currentChannel.create_at, { year: 'numeric', month: 'long', - day: 'numeric' + day: 'numeric', }); const mainMessage = intl.formatMessage({ id: 'intro_messages.creator', - defaultMessage: 'This is the start of the {name} {type}, created by {creator} on {date}.' + defaultMessage: 'This is the start of the {name} {type}, created by {creator} on {date}.', }, { name: currentChannel.display_name, creator: creatorName, date, type: intl.formatMessage({ id: 'intro_messages.group', - defaultMessage: 'private channel' - }) + defaultMessage: 'private channel', + }), }); const onlyInvitedMessage = intl.formatMessage({ id: 'intro_messages.onlyInvited', - defaultMessage: ' Only invited members can see this private channel.' + defaultMessage: ' Only invited members can see this private channel.', }); return ( @@ -236,9 +236,9 @@ class ChannelIntro extends PureComponent { {intl.formatMessage({ id: 'intro_messages.beginning', - defaultMessage: 'Beginning of {name}' + defaultMessage: 'Beginning of {name}', }, { - name: currentChannel.display_name + name: currentChannel.display_name, })} @@ -257,23 +257,23 @@ class ChannelIntro extends PureComponent { {intl.formatMessage({ id: 'intro_messages.beginning', - defaultMessage: 'Beginning of {name}' + defaultMessage: 'Beginning of {name}', }, { - name: currentChannel.display_name + name: currentChannel.display_name, })} {intl.formatMessage({ id: 'mobile.intro_messages.default_welcome', - defaultMessage: 'Welcome to {name}!' + defaultMessage: 'Welcome to {name}!', }, { - name: currentChannel.display_name + name: currentChannel.display_name, })} {intl.formatMessage({ id: 'mobile.intro_messages.default_message', - defaultMessage: 'This is the first channel teammates see when they sign up - use it for posting updates everyone needs to know.' + defaultMessage: 'This is the first channel teammates see when they sign up - use it for posting updates everyone needs to know.', })} @@ -348,42 +348,42 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { color: theme.centerChannelColor, fontSize: 19, fontWeight: '600', - marginBottom: 12 + marginBottom: 12, }, channelWelcome: { color: theme.centerChannelColor, - marginBottom: 12 + marginBottom: 12, }, container: { marginTop: 60, marginHorizontal: 12, - marginBottom: 12 + marginBottom: 12, }, displayName: { color: theme.centerChannelColor, fontSize: 15, - fontWeight: '600' + fontWeight: '600', }, message: { color: changeOpacity(theme.centerChannelColor, 0.8), fontSize: 15, - lineHeight: 22 + lineHeight: 22, }, namesContainer: { flexDirection: 'row', flexWrap: 'wrap', - marginBottom: 12 + marginBottom: 12, }, profile: { height: 67, marginBottom: 12, - marginRight: 12 + marginRight: 12, }, profilesContainer: { flexDirection: 'row', flexWrap: 'wrap', - justifyContent: 'flex-start' - } + justifyContent: 'flex-start', + }, }; }); diff --git a/app/components/channel_intro/index.js b/app/components/channel_intro/index.js index 496af524b..740a8fd17 100644 --- a/app/components/channel_intro/index.js +++ b/app/components/channel_intro/index.js @@ -51,7 +51,7 @@ function makeMapStateToProps() { currentChannel, currentChannelMembers, isLoadingPosts: (!postsInChannel || postsInChannel.length === 0) && getPostsRequestStatus === RequestStatus.STARTED, - theme: getTheme(state) + theme: getTheme(state), }; }; } diff --git a/app/components/channel_link/channel_link.js b/app/components/channel_link/channel_link.js index 7407f3411..df4e5fbc6 100644 --- a/app/components/channel_link/channel_link.js +++ b/app/components/channel_link/channel_link.js @@ -15,22 +15,22 @@ export default class ChannelLink extends React.PureComponent { channelsByName: PropTypes.object.isRequired, actions: PropTypes.shape({ handleSelectChannel: PropTypes.func.isRequired, - setChannelDisplayName: PropTypes.func.isRequired - }).isRequired + setChannelDisplayName: PropTypes.func.isRequired, + }).isRequired, }; constructor(props) { super(props); this.state = { - channel: this.getChannelFromChannelName(props) + channel: this.getChannelFromChannelName(props), }; } componentWillReceiveProps(nextProps) { if (nextProps.channelName !== this.props.channelName || nextProps.channelsByName !== this.props.channelsByName) { this.setState({ - channel: this.getChannelFromChannelName(nextProps) + channel: this.getChannelFromChannelName(nextProps), }); } } diff --git a/app/components/channel_link/index.js b/app/components/channel_link/index.js index 950bc996b..6277fad9c 100644 --- a/app/components/channel_link/index.js +++ b/app/components/channel_link/index.js @@ -12,7 +12,7 @@ import ChannelLink from './channel_link'; function mapStateToProps(state) { return { - channelsByName: getChannelsNameMapInCurrentTeam(state) + channelsByName: getChannelsNameMapInCurrentTeam(state), }; } @@ -20,8 +20,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ handleSelectChannel, - setChannelDisplayName - }, dispatch) + setChannelDisplayName, + }, dispatch), }; } diff --git a/app/components/channel_loader/channel_loader.js b/app/components/channel_loader/channel_loader.js index 669291dd0..d8cbcc420 100644 --- a/app/components/channel_loader/channel_loader.js +++ b/app/components/channel_loader/channel_loader.js @@ -5,7 +5,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { Platform, - View + View, } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; @@ -19,7 +19,7 @@ export default class ChannelLoader extends PureComponent { static propTypes = { channelIsLoading: PropTypes.bool.isRequired, deviceWidth: PropTypes.number.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; buildSections(key, style, top) { @@ -36,7 +36,7 @@ export default class ChannelLoader extends PureComponent { colors={[ changeOpacity('#e5e5e4', GRADIENT_START), changeOpacity('#d6d6d5', GRADIENT_MIDDLE), - changeOpacity('#e5e5e4', GRADIENT_END) + changeOpacity('#e5e5e4', GRADIENT_END), ]} locations={[0.1, 0.3, 0.7]} style={[style.messageText, {width: 106}]} @@ -47,7 +47,7 @@ export default class ChannelLoader extends PureComponent { colors={[ changeOpacity('#e5e5e4', GRADIENT_START), changeOpacity('#d6d6d5', GRADIENT_MIDDLE), - changeOpacity('#e5e5e4', GRADIENT_END) + changeOpacity('#e5e5e4', GRADIENT_END), ]} locations={[0.1, 0.3, 0.7]} style={[style.messageText, {alignSelf: 'stretch'}]} @@ -58,7 +58,7 @@ export default class ChannelLoader extends PureComponent { colors={[ changeOpacity('#e5e5e4', GRADIENT_START), changeOpacity('#d6d6d5', GRADIENT_MIDDLE), - changeOpacity('#e5e5e4', GRADIENT_END) + changeOpacity('#e5e5e4', GRADIENT_END), ]} locations={[0.1, 0.3, 0.7]} style={[style.messageText, {alignSelf: 'stretch'}]} @@ -93,35 +93,35 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { position: 'absolute', ...Platform.select({ android: { - top: 0 + top: 0, }, ios: { - top: 15 - } - }) + top: 15, + }, + }), }, avatar: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), borderRadius: 16, height: 32, - width: 32 + width: 32, }, messageText: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), height: 10, - marginBottom: 10 + marginBottom: 10, }, section: { backgroundColor: theme.centerChannelBg, flexDirection: 'row', paddingLeft: 12, paddingRight: 20, - marginVertical: 10 + marginVertical: 10, }, sectionMessage: { marginLeft: 12, - flex: 1 - } + flex: 1, + }, }; }); diff --git a/app/components/channel_loader/index.js b/app/components/channel_loader/index.js index 1627ff8fa..d99f1e453 100644 --- a/app/components/channel_loader/index.js +++ b/app/components/channel_loader/index.js @@ -11,7 +11,7 @@ function mapStateToProps(state) { return { channelIsLoading: state.views.channel.loading, deviceWidth, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/checkmark.js b/app/components/checkmark.js index 796753e54..81604162a 100644 --- a/app/components/checkmark.js +++ b/app/components/checkmark.js @@ -9,7 +9,7 @@ export default class CheckMark extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/client_upgrade_listener/client_upgrade_listener.js b/app/components/client_upgrade_listener/client_upgrade_listener.js index af90752f4..dfe68a062 100644 --- a/app/components/client_upgrade_listener/client_upgrade_listener.js +++ b/app/components/client_upgrade_listener/client_upgrade_listener.js @@ -8,7 +8,7 @@ import { Animated, Linking, TouchableOpacity, - View + View, } from 'react-native'; import {intlShape} from 'react-intl'; import DeviceInfo from 'react-native-device-info'; @@ -27,7 +27,7 @@ export default class ClientUpgradeListener extends PureComponent { static propTypes = { actions: PropTypes.shape({ logError: PropTypes.func.isRequired, - setLastUpgradeCheck: PropTypes.func.isRequired + setLastUpgradeCheck: PropTypes.func.isRequired, }).isRequired, currentVersion: PropTypes.string, downloadLink: PropTypes.string, @@ -37,11 +37,11 @@ export default class ClientUpgradeListener extends PureComponent { latestVersion: PropTypes.string, minVersion: PropTypes.string, navigator: PropTypes.object, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props) { @@ -54,7 +54,7 @@ export default class ClientUpgradeListener extends PureComponent { }); this.state = { - top: new Animated.Value(-100) + top: new Animated.Value(-100), }; } @@ -108,7 +108,7 @@ export default class ClientUpgradeListener extends PureComponent { } Animated.timing(this.state.top, { toValue, - duration: 300 + duration: 300, }).start(); }; @@ -128,11 +128,11 @@ export default class ClientUpgradeListener extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.client_upgrade.download_error.title', - defaultMessage: 'Upgrade Error' + defaultMessage: 'Upgrade Error', }), intl.formatMessage({ id: 'mobile.client_upgrade.download_error.message', - defaultMessage: 'An error occurred while trying to open the download link.' + defaultMessage: 'An error occurred while trying to open the download link.', }) ); @@ -152,17 +152,17 @@ export default class ClientUpgradeListener extends PureComponent { navigatorStyle: { navBarHidden: false, statusBarHidden: false, - statusBarHideWithNavBar: false + statusBarHideWithNavBar: false, }, navigatorButtons: { leftButtons: [{ id: 'close-upgrade', - icon: this.closeButton - }] + icon: this.closeButton, + }], }, passProps: { - upgradeType: this.state.upgradeType - } + upgradeType: this.state.upgradeType, + }, }); this.toggleUpgradeMessage(false); @@ -226,28 +226,28 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { justifyContent: 'space-around', borderTopColor: changeOpacity(theme.centerChannelColor, 0.2), backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), - borderTopWidth: 1 + borderTopWidth: 1, }, button: { color: theme.linkColor, fontSize: 13, paddingHorizontal: 5, - paddingVertical: 5 + paddingVertical: 5, }, container: { flex: 1, backgroundColor: changeOpacity(theme.centerChannelBg, 0.8), - borderRadius: 5 + borderRadius: 5, }, message: { flex: 1, justifyContent: 'center', - alignItems: 'center' + alignItems: 'center', }, messageText: { fontSize: 16, color: changeOpacity(theme.centerChannelColor, 0.8), - fontWeight: '600' + fontWeight: '600', }, wrapper: { position: 'absolute', @@ -262,10 +262,10 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { shadowColor: theme.centerChannelColor, shadowOffset: { width: 0, - height: 3 + height: 3, }, shadowOpacity: 0.2, - shadowRadius: 2 - } + shadowRadius: 2, + }, }; }); diff --git a/app/components/client_upgrade_listener/index.js b/app/components/client_upgrade_listener/index.js index 5924e96dd..dff4da9f2 100644 --- a/app/components/client_upgrade_listener/index.js +++ b/app/components/client_upgrade_listener/index.js @@ -21,7 +21,7 @@ function mapStateToProps(state) { lastUpgradeCheck: state.views.clientUpgrade.lastUpdateCheck, latestVersion, minVersion, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -29,8 +29,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ logError, - setLastUpgradeCheck - }, dispatch) + setLastUpgradeCheck, + }, dispatch), }; } diff --git a/app/components/conditional_touchable.js b/app/components/conditional_touchable.js index 9890609b3..d851d660e 100644 --- a/app/components/conditional_touchable.js +++ b/app/components/conditional_touchable.js @@ -10,7 +10,7 @@ import CustomPropTypes from 'app/constants/custom_prop_types'; export default class ConditionalTouchable extends React.PureComponent { static propTypes = { touchable: PropTypes.bool, - children: CustomPropTypes.Children.isRequired + children: CustomPropTypes.Children.isRequired, }; render() { diff --git a/app/components/custom_list/channel_list_row/channel_list_row.js b/app/components/custom_list/channel_list_row/channel_list_row.js index 8d86bf229..fef28076e 100644 --- a/app/components/custom_list/channel_list_row/channel_list_row.js +++ b/app/components/custom_list/channel_list_row/channel_list_row.js @@ -5,7 +5,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Text, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; import {makeStyleSheetFromTheme, changeOpacity} from 'app/utils/theme'; @@ -17,7 +17,7 @@ export default class ChannelListRow extends React.PureComponent { id: PropTypes.string.isRequired, theme: PropTypes.object.isRequired, channel: PropTypes.object.isRequired, - ...CustomListRow.propTypes + ...CustomListRow.propTypes, }; onPress = () => { @@ -70,25 +70,25 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { titleContainer: { alignItems: 'center', - flexDirection: 'row' + flexDirection: 'row', }, displayName: { fontSize: 16, color: theme.centerChannelColor, - marginLeft: 5 + marginLeft: 5, }, icon: { fontSize: 16, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, container: { flex: 1, - flexDirection: 'column' + flexDirection: 'column', }, purpose: { marginTop: 7, fontSize: 13, - color: changeOpacity(theme.centerChannelColor, 0.5) - } + color: changeOpacity(theme.centerChannelColor, 0.5), + }, }; }); diff --git a/app/components/custom_list/channel_list_row/index.js b/app/components/custom_list/channel_list_row/index.js index db8823128..4725f6a06 100644 --- a/app/components/custom_list/channel_list_row/index.js +++ b/app/components/custom_list/channel_list_row/index.js @@ -15,7 +15,7 @@ function makeMapStateToProps() { return (state, ownProps) => { return { theme: getTheme(state), - channel: getChannel(state, ownProps) + channel: getChannel(state, ownProps), }; }; } diff --git a/app/components/custom_list/custom_list_row.js b/app/components/custom_list/custom_list_row.js index 12bed4268..95c8d600e 100644 --- a/app/components/custom_list/custom_list_row.js +++ b/app/components/custom_list/custom_list_row.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import { - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -19,11 +19,11 @@ export default class CustomListRow extends React.PureComponent { enabled: PropTypes.bool, selectable: PropTypes.bool, selected: PropTypes.bool, - children: CustomPropTypes.Children + children: CustomPropTypes.Children, }; static defaultProps = { - enabled: true + enabled: true, }; render() { @@ -62,11 +62,11 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { height: 65, paddingHorizontal: 15, alignItems: 'center', - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, displayName: { fontSize: 15, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, selector: { height: 28, @@ -75,20 +75,20 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { borderWidth: 1, borderColor: '#888', alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, selectorContainer: { height: 50, paddingRight: 15, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, selectorDisabled: { - backgroundColor: '#888' + backgroundColor: '#888', }, selectorFilled: { backgroundColor: '#378FD2', - borderWidth: 0 - } + borderWidth: 0, + }, }; }); diff --git a/app/components/custom_list/index.js b/app/components/custom_list/index.js index d446c24ae..f204472dd 100644 --- a/app/components/custom_list/index.js +++ b/app/components/custom_list/index.js @@ -26,7 +26,7 @@ export default class CustomList extends PureComponent { onRowSelect: PropTypes.func, renderRow: PropTypes.func.isRequired, createSections: PropTypes.func, - showNoResults: PropTypes.bool + showNoResults: PropTypes.bool, }; static defaultProps = { @@ -40,7 +40,7 @@ export default class CustomList extends PureComponent { selectable: false, createSections: () => true, showSections: true, - showNoResults: true + showNoResults: true, }; constructor(props) { @@ -64,7 +64,7 @@ export default class CustomList extends PureComponent { const dataSource = showSections ? this.state.dataSource.cloneWithRowsAndSections(mergedData) : this.state.dataSource.cloneWithRows(mergedData); this.setState({ data: mergedData, - dataSource + dataSource, }); } } @@ -72,7 +72,7 @@ export default class CustomList extends PureComponent { buildDataSource = (props) => { const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2, - sectionHeaderHasChanged: (s1, s2) => s1 !== s2 + sectionHeaderHasChanged: (s1, s2) => s1 !== s2, }); let newData = props.data; if (props.showSections) { @@ -81,7 +81,7 @@ export default class CustomList extends PureComponent { const dataSource = props.showSections ? ds.cloneWithRowsAndSections(newData) : ds.cloneWithRows(newData); return { data: newData, - dataSource + dataSource, }; }; @@ -97,7 +97,7 @@ export default class CustomList extends PureComponent { const dataSource = this.state.dataSource.cloneWithRowsAndSections(mergedData); this.setState({ data: mergedData, - dataSource + dataSource, }, () => this.props.onRowSelect(id)); }; @@ -118,7 +118,7 @@ export default class CustomList extends PureComponent { item, selected: item.selected, selectable: this.props.selectable, - onPress: this.props.onRowPress + onPress: this.props.onRowPress, }; if ('disableSelect' in item) { @@ -181,7 +181,7 @@ export default class CustomList extends PureComponent { searching, showNoResults, showSections, - theme + theme, } = this.props; const {dataSource} = this.state; const style = getStyleFromTheme(theme); @@ -245,45 +245,45 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { backgroundColor: theme.centerChannelBg, ...Platform.select({ android: { - marginBottom: 20 - } - }) + marginBottom: 20, + }, + }), }, loadingText: { - color: changeOpacity(theme.centerChannelColor, 0.6) + color: changeOpacity(theme.centerChannelColor, 0.6), }, searching: { backgroundColor: theme.centerChannelBg, height: '100%', position: 'absolute', - width: '100%' + width: '100%', }, sectionContainer: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.07), paddingLeft: 10, - paddingVertical: 2 + paddingVertical: 2, }, sectionWrapper: { - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, sectionText: { fontWeight: '600', - color: theme.centerChannelColor + color: theme.centerChannelColor, }, separator: { height: 1, flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.1) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), }, noResultContainer: { flex: 1, flexDirection: 'row', alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, noResultText: { fontSize: 26, - color: changeOpacity(theme.centerChannelColor, 0.5) - } + color: changeOpacity(theme.centerChannelColor, 0.5), + }, }; }); diff --git a/app/components/custom_list/user_list_row/index.js b/app/components/custom_list/user_list_row/index.js index 215ac72be..68b1609f6 100644 --- a/app/components/custom_list/user_list_row/index.js +++ b/app/components/custom_list/user_list_row/index.js @@ -13,7 +13,7 @@ function mapStateToProps(state, ownProps) { isMyUser: getCurrentUserId(state) === ownProps.id, theme: getTheme(state), user: getUser(state, ownProps.id), - teammateNameDisplay: getTeammateNameDisplaySetting(state) + teammateNameDisplay: getTeammateNameDisplaySetting(state), }; } diff --git a/app/components/custom_list/user_list_row/user_list_row.js b/app/components/custom_list/user_list_row/user_list_row.js index 8455a9e01..a583b23ab 100644 --- a/app/components/custom_list/user_list_row/user_list_row.js +++ b/app/components/custom_list/user_list_row/user_list_row.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {intlShape} from 'react-intl'; import { Text, - View + View, } from 'react-native'; import ProfilePicture from 'app/components/profile_picture'; import {makeStyleSheetFromTheme, changeOpacity} from 'app/utils/theme'; @@ -22,11 +22,11 @@ export default class UserListRow extends React.PureComponent { theme: PropTypes.object.isRequired, user: PropTypes.object.isRequired, teammateNameDisplay: PropTypes.string.isRequired, - ...CustomListRow.propTypes + ...CustomListRow.propTypes, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; onPress = () => { @@ -44,7 +44,7 @@ export default class UserListRow extends React.PureComponent { selected, teammateNameDisplay, theme, - user + user, } = this.props; const {id, username} = user; @@ -54,7 +54,7 @@ export default class UserListRow extends React.PureComponent { if (isMyUser) { usernameDisplay = formatMessage({ id: 'mobile.more_dms.you', - defaultMessage: '(@{username} - you)' + defaultMessage: '(@{username} - you)', }, {username}); } @@ -99,24 +99,24 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { height: 65, paddingHorizontal: 15, alignItems: 'center', - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, displayName: { fontSize: 15, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, icon: { fontSize: 20, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, textContainer: { flexDirection: 'row', - marginLeft: 5 + marginLeft: 5, }, username: { marginLeft: 5, fontSize: 15, - color: changeOpacity(theme.centerChannelColor, 0.5) + color: changeOpacity(theme.centerChannelColor, 0.5), }, selector: { height: 28, @@ -125,20 +125,20 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { borderWidth: 1, borderColor: '#888', alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, selectorContainer: { height: 50, paddingRight: 15, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, selectorDisabled: { - backgroundColor: '#888' + backgroundColor: '#888', }, selectorFilled: { backgroundColor: '#378FD2', - borderWidth: 0 - } + borderWidth: 0, + }, }; }); diff --git a/app/components/custom_section_list.js b/app/components/custom_section_list.js index 7bab038e5..e634aafeb 100644 --- a/app/components/custom_section_list.js +++ b/app/components/custom_section_list.js @@ -6,7 +6,7 @@ import { Platform, SectionList, Text, - View + View, } from 'react-native'; import Loading from 'app/components/loading'; @@ -85,7 +85,7 @@ export default class CustomSectionList extends React.PureComponent { /* * How many items to render when the list is first rendered. */ - initialNumToRender: PropTypes.number + initialNumToRender: PropTypes.number, }; static defaultProps = { @@ -96,21 +96,21 @@ export default class CustomSectionList extends React.PureComponent { onListEndReached: () => true, onListEndReachedThreshold: 50, loadingText: null, - initialNumToRender: 10 + initialNumToRender: 10, }; constructor(props) { super(props); this.state = { - sections: this.extractSections(props.items) + sections: this.extractSections(props.items), }; } componentWillReceiveProps(nextProps) { if (nextProps.items !== this.props.items) { this.setState({ - sections: this.extractSections(nextProps.items) + sections: this.extractSections(nextProps.items), }); } } @@ -134,7 +134,7 @@ export default class CustomSectionList extends React.PureComponent { return sectionKeys.map((sectionKey) => { return { key: sectionKey, - data: sections[sectionKey].sort(this.props.compareItems) + data: sections[sectionKey].sort(this.props.compareItems), }; }); } @@ -156,7 +156,7 @@ export default class CustomSectionList extends React.PureComponent { const props = { id: item.id, item, - onPress: this.props.onRowPress + onPress: this.props.onRowPress, }; // Allow passing in a component like UserListRow or ChannelListRow @@ -258,51 +258,51 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { backgroundColor: theme.centerChannelBg, ...Platform.select({ android: { - marginBottom: 20 - } - }) + marginBottom: 20, + }, + }), }, loading: { height: 70, backgroundColor: theme.centerChannelBg, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, loadingText: { - color: changeOpacity(theme.centerChannelColor, 0.6) + color: changeOpacity(theme.centerChannelColor, 0.6), }, searching: { backgroundColor: theme.centerChannelBg, height: '100%', position: 'absolute', - width: '100%' + width: '100%', }, sectionContainer: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.07), paddingLeft: 10, - paddingVertical: 2 + paddingVertical: 2, }, sectionWrapper: { - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, sectionText: { fontWeight: '600', - color: theme.centerChannelColor + color: theme.centerChannelColor, }, separator: { height: 1, flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.1) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), }, noResultContainer: { flex: 1, flexDirection: 'row', alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, noResultText: { fontSize: 26, - color: changeOpacity(theme.centerChannelColor, 0.5) - } + color: changeOpacity(theme.centerChannelColor, 0.5), + }, }; }); diff --git a/app/components/drawer.js b/app/components/drawer.js index 05c242e14..e03131baa 100644 --- a/app/components/drawer.js +++ b/app/components/drawer.js @@ -11,7 +11,7 @@ export default class Drawer extends BaseDrawer { ...BaseDrawer.propTypes, onRequestClose: PropTypes.func.isRequired, bottomPanOffset: PropTypes.number, - topPanOffset: PropTypes.number + topPanOffset: PropTypes.number, }; constructor(props) { diff --git a/app/components/edit_channel_info/index.js b/app/components/edit_channel_info/index.js index 838fe2ef3..6d066874c 100644 --- a/app/components/edit_channel_info/index.js +++ b/app/components/edit_channel_info/index.js @@ -8,7 +8,7 @@ import { TouchableWithoutFeedback, View, Text, - findNodeHandle + findNodeHandle, } from 'react-native'; import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; @@ -47,11 +47,11 @@ export default class EditChannelInfo extends PureComponent { oldDisplayName: PropTypes.string, oldChannelURL: PropTypes.string, oldHeader: PropTypes.string, - oldPurpose: PropTypes.string + oldPurpose: PropTypes.string, }; static defaultProps = { - editing: false + editing: false, }; blur = () => { @@ -96,7 +96,7 @@ export default class EditChannelInfo extends PureComponent { this.props.navigator.pop({animated: true}); } else { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); } }; @@ -110,7 +110,7 @@ export default class EditChannelInfo extends PureComponent { oldDisplayName, oldChannelURL, oldPurpose, - oldHeader + oldHeader, } = this.props; return displayName !== oldDisplayName || channelURL !== oldChannelURL || @@ -190,7 +190,7 @@ export default class EditChannelInfo extends PureComponent { displayName, channelURL, header, - purpose + purpose, } = this.props; const {error, saving} = this.props; const fullUrl = currentTeamUrl + '/channels'; @@ -374,54 +374,54 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, scrollView: { flex: 1, backgroundColor: changeOpacity(theme.centerChannelColor, 0.03), - paddingTop: 10 + paddingTop: 10, }, errorContainer: { - backgroundColor: changeOpacity(theme.centerChannelColor, 0.03) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.03), }, errorWrapper: { justifyContent: 'center', - alignItems: 'center' + alignItems: 'center', }, inputContainer: { marginTop: 10, - backgroundColor: '#fff' + backgroundColor: '#fff', }, input: { color: '#333', fontSize: 14, height: 40, - paddingHorizontal: 15 + paddingHorizontal: 15, }, titleContainer30: { flexDirection: 'row', - marginTop: 30 + marginTop: 30, }, titleContainer15: { flexDirection: 'row', - marginTop: 15 + marginTop: 15, }, title: { fontSize: 14, color: theme.centerChannelColor, - marginLeft: 15 + marginLeft: 15, }, optional: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 14, - marginLeft: 5 + marginLeft: 5, }, helpText: { fontSize: 14, color: changeOpacity(theme.centerChannelColor, 0.5), marginTop: 10, - marginHorizontal: 15 - } + marginHorizontal: 15, + }, }; }); diff --git a/app/components/emoji/emoji.js b/app/components/emoji/emoji.js index dffc606d9..9e2d1ba8c 100644 --- a/app/components/emoji/emoji.js +++ b/app/components/emoji/emoji.js @@ -8,7 +8,7 @@ import { PixelRatio, Platform, StyleSheet, - Text + Text, } from 'react-native'; import FastImage from 'react-native-fast-image'; @@ -46,14 +46,14 @@ export default class Emoji extends React.PureComponent { literal: PropTypes.string, size: PropTypes.number, textStyle: CustomPropTypes.Style, - token: PropTypes.string.isRequired + token: PropTypes.string.isRequired, }; static defaultProps = { customEmojis: new Map(), literal: '', imageUrl: '', - isCustomEmoji: false + isCustomEmoji: false, }; constructor(props) { @@ -61,7 +61,7 @@ export default class Emoji extends React.PureComponent { this.state = { originalWidth: 0, - originalHeight: 0 + originalHeight: 0, }; } @@ -76,7 +76,7 @@ export default class Emoji extends React.PureComponent { if (nextProps.emojiName !== this.props.emojiName) { this.setState({ originalWidth: 0, - originalHeight: 0 + originalHeight: 0, }); } @@ -95,7 +95,7 @@ export default class Emoji extends React.PureComponent { if (this.mounted) { this.setState({ originalWidth, - originalHeight + originalHeight, }); } }); @@ -107,7 +107,7 @@ export default class Emoji extends React.PureComponent { textStyle, token, imageUrl, - displayTextOnly + displayTextOnly, } = this.props; let size = this.props.size; @@ -125,8 +125,8 @@ export default class Emoji extends React.PureComponent { const source = { uri: imageUrl, headers: { - Authorization: `Bearer ${token}` - } + Authorization: `Bearer ${token}`, + }, }; let width = size; diff --git a/app/components/emoji/index.js b/app/components/emoji/index.js index 8d4a2a4ef..3bf504401 100644 --- a/app/components/emoji/index.js +++ b/app/components/emoji/index.js @@ -38,7 +38,7 @@ function mapStateToProps(state, ownProps) { imageUrl, isCustomEmoji, displayTextOnly, - token: state.entities.general.credentials.token + token: state.entities.general.credentials.token, }; } diff --git a/app/components/emoji_picker/emoji_picker.js b/app/components/emoji_picker/emoji_picker.js index e37fc5df5..e0ef77fcf 100644 --- a/app/components/emoji_picker/emoji_picker.js +++ b/app/components/emoji_picker/emoji_picker.js @@ -12,7 +12,7 @@ import { SectionList, Text, TouchableOpacity, - View + View, } from 'react-native'; import DeviceInfo from 'react-native-device-info'; import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome'; @@ -50,16 +50,16 @@ export default class EmojiPicker extends PureComponent { actions: PropTypes.shape({ getCustomEmojis: PropTypes.func.isRequired, incrementEmojiPickerPage: PropTypes.func.isRequired, - searchCustomEmojis: PropTypes.func.isRequired - }).isRequired + searchCustomEmojis: PropTypes.func.isRequired, + }).isRequired, }; static defaultProps = { - onEmojiPress: emptyFunction + onEmojiPress: emptyFunction, }; static contextTypes = { - intl: intlShape.isRequired + intl: intlShape.isRequired, }; constructor(props) { @@ -69,7 +69,7 @@ export default class EmojiPicker extends PureComponent { getItemHeight: () => { return EMOJI_SIZE + (EMOJI_GUTTER * 2); }, - getSectionHeaderHeight: () => SECTION_HEADER_HEIGHT + getSectionHeaderHeight: () => SECTION_HEADER_HEIGHT, }); const emojis = this.renderableEmojis(props.emojisBySection, props.deviceWidth); @@ -83,7 +83,7 @@ export default class EmojiPicker extends PureComponent { filteredEmojis: [], searchTerm: '', currentSectionIndex: 0, - missingPages: isMinimumServerVersion(this.props.serverVersion, 4, 7) + missingPages: isMinimumServerVersion(this.props.serverVersion, 4, 7), }; } @@ -104,7 +104,7 @@ export default class EmojiPicker extends PureComponent { if (rebuildEmojis) { const emojis = this.renderableEmojis(this.props.emojisBySection, nextProps.deviceWidth); this.setState({ - emojis + emojis, }); } } @@ -116,7 +116,7 @@ export default class EmojiPicker extends PureComponent { const data = []; let row = { key: `${section.key}-0`, - items: [] + items: [], }; section.data.forEach((emoji, index) => { @@ -124,7 +124,7 @@ export default class EmojiPicker extends PureComponent { data.push(row); row = { key: `${section.key}-${index}`, - items: [] + items: [], }; } @@ -143,7 +143,7 @@ export default class EmojiPicker extends PureComponent { return { ...section, - data + data, }; }); @@ -163,7 +163,7 @@ export default class EmojiPicker extends PureComponent { changeSearchTerm = (text) => { const nextState = { - searchTerm: text + searchTerm: text, }; if (!text) { @@ -180,7 +180,7 @@ export default class EmojiPicker extends PureComponent { } const filteredEmojis = this.searchEmojis(text); this.setState({ - filteredEmojis + filteredEmojis, }); }, timeout); }; @@ -189,7 +189,7 @@ export default class EmojiPicker extends PureComponent { this.setState({ currentSectionIndex: 0, filteredEmojis: [], - searchTerm: '' + searchTerm: '', }); }; @@ -285,7 +285,7 @@ export default class EmojiPicker extends PureComponent { if (nextIndex !== this.state.currentSectionIndex) { this.setState({ - currentSectionIndex: nextIndex + currentSectionIndex: nextIndex, }); } }; @@ -293,7 +293,7 @@ export default class EmojiPicker extends PureComponent { onMomentumScrollEnd = () => { if (this.state.jumpToSection) { this.setState({ - jumpToSection: false + jumpToSection: false, }); } }; @@ -301,12 +301,12 @@ export default class EmojiPicker extends PureComponent { scrollToSection = (index) => { this.setState({ jumpToSection: true, - currentSectionIndex: index + currentSectionIndex: index, }, () => { this.sectionList.scrollToLocation({ sectionIndex: index, itemIndex: 0, - viewOffset: 25 + viewOffset: 25, }); }); }; @@ -447,9 +447,9 @@ export default class EmojiPicker extends PureComponent { fontSize: 13, ...Platform.select({ android: { - marginBottom: -3 - } - }) + marginBottom: -3, + }, + }), }; return ( @@ -499,7 +499,7 @@ const getStyleSheetFromTheme = makeStyleSheetFromTheme((theme) => { borderTopColor: changeOpacity(theme.centerChannelColor, 0.3), borderTopWidth: 1, flexDirection: 'row', - justifyContent: 'space-between' + justifyContent: 'space-between', }, bottomContentWrapper: { position: 'absolute', @@ -507,43 +507,43 @@ const getStyleSheetFromTheme = makeStyleSheetFromTheme((theme) => { left: 0, right: 0, height: 35, - width: '100%' + width: '100%', }, columnStyle: { alignSelf: 'stretch', flexDirection: 'row', marginVertical: EMOJI_GUTTER, - justifyContent: 'flex-start' + justifyContent: 'flex-start', }, container: { alignItems: 'center', backgroundColor: theme.centerChannelBg, - flex: 1 + flex: 1, }, emoji: { width: EMOJI_SIZE, height: EMOJI_SIZE, marginHorizontal: EMOJI_GUTTER, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, emojiLeft: { - marginLeft: 0 + marginLeft: 0, }, emojiRight: { - marginRight: 0 + marginRight: 0, }, flatList: { flex: 1, backgroundColor: theme.centerChannelBg, - alignSelf: 'stretch' + alignSelf: 'stretch', }, flatListEmoji: { - marginRight: 5 + marginRight: 5, }, flatListEmojiName: { fontSize: 13, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, flatListRow: { height: 40, @@ -556,47 +556,47 @@ const getStyleSheetFromTheme = makeStyleSheetFromTheme((theme) => { borderLeftWidth: 1, borderLeftColor: changeOpacity(theme.centerChannelColor, 0.2), borderRightWidth: 1, - borderRightColor: changeOpacity(theme.centerChannelColor, 0.2) + borderRightColor: changeOpacity(theme.centerChannelColor, 0.2), }, listView: { backgroundColor: theme.centerChannelBg, - marginBottom: 35 + marginBottom: 35, }, searchBar: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), - paddingVertical: 5 + paddingVertical: 5, }, section: { - alignItems: 'center' + alignItems: 'center', }, sectionIcon: { - color: changeOpacity(theme.centerChannelColor, 0.3) + color: changeOpacity(theme.centerChannelColor, 0.3), }, sectionIconContainer: { flex: 1, height: 35, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, sectionIconHighlight: { - color: theme.centerChannelColor + color: theme.centerChannelColor, }, sectionTitle: { color: changeOpacity(theme.centerChannelColor, 0.2), fontSize: 15, - fontWeight: '700' + fontWeight: '700', }, sectionTitleContainer: { height: SECTION_HEADER_HEIGHT, justifyContent: 'center', - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { - flex: 1 + flex: 1, }, loading: { flex: 1, - alignItems: 'center' - } + alignItems: 'center', + }, }; }); diff --git a/app/components/emoji_picker/emoji_picker_row.js b/app/components/emoji_picker/emoji_picker_row.js index a18d4fa2a..2beebc33d 100644 --- a/app/components/emoji_picker/emoji_picker_row.js +++ b/app/components/emoji_picker/emoji_picker_row.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { StyleSheet, TouchableOpacity, - View + View, } from 'react-native'; import shallowEqual from 'shallow-equals'; @@ -17,7 +17,7 @@ export default class EmojiPickerRow extends Component { emojiGutter: PropTypes.number.isRequired, emojiSize: PropTypes.number.isRequired, items: PropTypes.array.isRequired, - onEmojiPress: PropTypes.func.isRequired + onEmojiPress: PropTypes.func.isRequired, } shouldComponentUpdate(nextProps) { @@ -32,8 +32,8 @@ export default class EmojiPickerRow extends Component { { width: emojiSize, height: emojiSize, - marginHorizontal: emojiGutter - } + marginHorizontal: emojiGutter, + }, ]; if (index === 0) { style.push(styles.emojiLeft); @@ -81,16 +81,16 @@ const styles = StyleSheet.create({ columnStyle: { alignSelf: 'stretch', flexDirection: 'row', - justifyContent: 'space-between' + justifyContent: 'space-between', }, emoji: { alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, emojiLeft: { - marginLeft: 0 + marginLeft: 0, }, emojiRight: { - marginRight: 0 - } + marginRight: 0, + }, }); diff --git a/app/components/emoji_picker/index.js b/app/components/emoji_picker/index.js index 7cae05a01..62e83877b 100644 --- a/app/components/emoji_picker/index.js +++ b/app/components/emoji_picker/index.js @@ -22,60 +22,60 @@ const categoryToI18n = { activity: { id: 'mobile.emoji_picker.activity', defaultMessage: 'ACTIVITY', - icon: 'futbol-o' + icon: 'futbol-o', }, custom: { id: 'mobile.emoji_picker.custom', defaultMessage: 'CUSTOM', - icon: 'at' + icon: 'at', }, flags: { id: 'mobile.emoji_picker.flags', defaultMessage: 'FLAGS', - icon: 'flag-o' + icon: 'flag-o', }, foods: { id: 'mobile.emoji_picker.foods', defaultMessage: 'FOODS', - icon: 'cutlery' + icon: 'cutlery', }, nature: { id: 'mobile.emoji_picker.nature', defaultMessage: 'NATURE', - icon: 'leaf' + icon: 'leaf', }, objects: { id: 'mobile.emoji_picker.objects', defaultMessage: 'OBJECTS', - icon: 'lightbulb-o' + icon: 'lightbulb-o', }, people: { id: 'mobile.emoji_picker.people', defaultMessage: 'PEOPLE', - icon: 'smile-o' + icon: 'smile-o', }, places: { id: 'mobile.emoji_picker.places', defaultMessage: 'PLACES', - icon: 'plane' + icon: 'plane', }, recent: { id: 'mobile.emoji_picker.recent', defaultMessage: 'RECENTLY USED', - icon: 'clock-o' + icon: 'clock-o', }, symbols: { id: 'mobile.emoji_picker.symbols', defaultMessage: 'SYMBOLS', - icon: 'heart-o' - } + icon: 'heart-o', + }, }; function fillEmoji(indice) { const emoji = Emojis[indice]; return { name: emoji.aliases[0], - aliases: emoji.aliases + aliases: emoji.aliases, }; } @@ -89,7 +89,7 @@ const getEmojisBySection = createSelector( const section = { ...categoryToI18n[category], key: category, - data: items + data: items, }; return section; @@ -99,14 +99,14 @@ const getEmojisBySection = createSelector( for (const [key] of customEmojis) { customEmojiItems.push({ - name: key + name: key, }); } emoticons.push({ ...categoryToI18n.custom, key: 'custom', - data: customEmojiItems + data: customEmojiItems, }); if (recentEmojis.length) { @@ -115,7 +115,7 @@ const getEmojisBySection = createSelector( emoticons.unshift({ ...categoryToI18n.recent, key: 'recent', - data: items + data: items, }); } @@ -145,7 +145,7 @@ function mapStateToProps(state) { location: 0, distance: 100, minMatchCharLength: 2, - maxPatternLength: 32 + maxPatternLength: 32, }; const list = emojis.length ? emojis : []; @@ -160,7 +160,7 @@ function mapStateToProps(state) { theme: getTheme(state), customEmojisEnabled: getConfig(state).EnableCustomEmoji === 'true', customEmojiPage: state.views.emoji.emojiPickerCustomPage, - serverVersion: state.entities.general.serverVersion || Client4.getServerVersion() + serverVersion: state.entities.general.serverVersion || Client4.getServerVersion(), }; } @@ -169,8 +169,8 @@ function mapDispatchToProps(dispatch) { actions: bindActionCreators({ getCustomEmojis, incrementEmojiPickerPage, - searchCustomEmojis - }, dispatch) + searchCustomEmojis, + }, dispatch), }; } diff --git a/app/components/error_list/error_list.js b/app/components/error_list/error_list.js index b39690445..e2e453eee 100644 --- a/app/components/error_list/error_list.js +++ b/app/components/error_list/error_list.js @@ -7,7 +7,7 @@ import { Dimensions, StyleSheet, View, - TouchableOpacity + TouchableOpacity, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; import FormattedText from 'app/components/formatted_text'; @@ -25,22 +25,22 @@ const style = StyleSheet.create({ borderColor: '#fff', borderWidth: 1, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, closeButtonContainer: { alignItems: 'center', justifyContent: 'center', - marginTop: 5 + marginTop: 5, }, closeButtonText: { - color: '#fff' + color: '#fff', }, container: { paddingTop: 15, paddingBottom: 15, alignItems: 'center', justifyContent: 'center', - minHeight: 75 + minHeight: 75, }, wrapper: { position: 'absolute', @@ -49,17 +49,17 @@ const style = StyleSheet.create({ width: deviceWidth, overflow: 'hidden', backgroundColor: 'rgba(255, 116, 92, 1)', - zIndex: 99999 - } + zIndex: 99999, + }, }); export default class ErrorList extends PureComponent { static propTypes = { actions: PropTypes.shape({ dismissError: PropTypes.func.isRequired, - clearErrors: PropTypes.func.isRequired + clearErrors: PropTypes.func.isRequired, }).isRequired, - errors: PropTypes.array.isRequired + errors: PropTypes.array.isRequired, } renderErrorsList() { diff --git a/app/components/error_list/general_error.js b/app/components/error_list/general_error.js index a32cac69b..c886b9691 100644 --- a/app/components/error_list/general_error.js +++ b/app/components/error_list/general_error.js @@ -7,7 +7,7 @@ import { StyleSheet, View, Text, - TouchableOpacity + TouchableOpacity, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -16,22 +16,22 @@ const style = StyleSheet.create({ width: 25, height: 25, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, buttons: { - marginHorizontal: 15 + marginHorizontal: 15, }, container: { alignSelf: 'stretch', paddingHorizontal: 15, paddingVertical: 8, flexDirection: 'row', - alignItems: 'center' + alignItems: 'center', }, message: { flex: 1, - color: '#fff' - } + color: '#fff', + }, }); function GeneralError(props) { @@ -66,7 +66,7 @@ function GeneralError(props) { GeneralError.propTypes = { dismiss: PropTypes.func.isRequired, - error: PropTypes.object.isRequired + error: PropTypes.object.isRequired, }; export default GeneralError; diff --git a/app/components/error_list/index.js b/app/components/error_list/index.js index 944b79e85..85eb21678 100644 --- a/app/components/error_list/index.js +++ b/app/components/error_list/index.js @@ -11,7 +11,7 @@ import ErrorList from './error_list'; function mapStateToProps(state) { return { - errors: getDisplayableErrors(state) + errors: getDisplayableErrors(state), }; } @@ -19,8 +19,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ dismissError, - clearErrors - }, dispatch) + clearErrors, + }, dispatch), }; } diff --git a/app/components/error_text.js b/app/components/error_text.js index feb4c7e5e..d6c19c6a3 100644 --- a/app/components/error_text.js +++ b/app/components/error_text.js @@ -16,7 +16,7 @@ class ErrorText extends PureComponent { static propTypes = { error: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), textStyle: CustomPropTypes.Style, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { @@ -50,15 +50,15 @@ class ErrorText extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { errorLabel: { - color: (theme.errorTextColor || '#DA4A4A') - } + color: (theme.errorTextColor || '#DA4A4A'), + }, }; }); function mapStateToProps(state, ownProps) { return { ...ownProps, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/file_attachment_list/file_attachment.js b/app/components/file_attachment_list/file_attachment.js index 3e4e5d655..fba313e81 100644 --- a/app/components/file_attachment_list/file_attachment.js +++ b/app/components/file_attachment_list/file_attachment.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Text, TouchableOpacity, - View + View, } from 'react-native'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -23,12 +23,12 @@ export default class FileAttachment extends PureComponent { file: PropTypes.object.isRequired, onInfoPress: PropTypes.func, onPreviewPress: PropTypes.func, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { onInfoPress: () => true, - onPreviewPress: () => true + onPreviewPress: () => true, }; handlePreviewPress = () => { @@ -117,43 +117,43 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { downloadIcon: { color: changeOpacity(theme.centerChannelColor, 0.7), - marginRight: 5 + marginRight: 5, }, fileDownloadContainer: { flexDirection: 'row', - marginTop: 3 + marginTop: 3, }, fileInfo: { marginLeft: 2, fontSize: 14, - color: changeOpacity(theme.centerChannelColor, 0.5) + color: changeOpacity(theme.centerChannelColor, 0.5), }, fileInfoContainer: { flex: 1, paddingHorizontal: 8, paddingVertical: 5, borderLeftWidth: 1, - borderLeftColor: changeOpacity(theme.centerChannelColor, 0.2) + borderLeftColor: changeOpacity(theme.centerChannelColor, 0.2), }, fileName: { flexDirection: 'column', flexWrap: 'wrap', marginLeft: 2, fontSize: 14, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, fileWrapper: { flex: 1, flexDirection: 'row', marginTop: 10, borderWidth: 1, - borderColor: changeOpacity(theme.centerChannelColor, 0.2) + borderColor: changeOpacity(theme.centerChannelColor, 0.2), }, circularProgress: { width: '100%', height: '100%', alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, circularProgressContent: { position: 'absolute', @@ -162,7 +162,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { top: 0, left: 0, alignItems: 'center', - justifyContent: 'center' - } + justifyContent: 'center', + }, }; }); diff --git a/app/components/file_attachment_list/file_attachment_document.js b/app/components/file_attachment_list/file_attachment_document.js index 08b484f37..1d0edf1e1 100644 --- a/app/components/file_attachment_list/file_attachment_document.js +++ b/app/components/file_attachment_list/file_attachment_document.js @@ -8,7 +8,7 @@ import { Platform, StyleSheet, TouchableOpacity, - View + View, } from 'react-native'; import OpenFile from 'react-native-doc-viewer'; import RNFetchBlob from 'react-native-fetch-blob'; @@ -33,7 +33,7 @@ export const SUPPORTED_DOCS_FORMAT = [ 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/xml', - 'text/csv' + 'text/csv', ]; export default class FileAttachmentDocument extends PureComponent { @@ -43,24 +43,24 @@ export default class FileAttachmentDocument extends PureComponent { file: PropTypes.object.isRequired, theme: PropTypes.object.isRequired, wrapperHeight: PropTypes.number, - wrapperWidth: PropTypes.number + wrapperWidth: PropTypes.number, }; static defaultProps = { iconHeight: 65, iconWidth: 65, wrapperHeight: 100, - wrapperWidth: 100 + wrapperWidth: 100, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; state = { didCancel: false, downloading: false, - progress: 0 + progress: 0, }; componentDidMount() { @@ -102,7 +102,7 @@ export default class FileAttachmentDocument extends PureComponent { timeout: 10000, indicator: true, overwrite: true, - path + path, }; const exist = await RNFetchBlob.fs.exists(path); @@ -121,7 +121,7 @@ export default class FileAttachmentDocument extends PureComponent { await this.downloadTask; if (this.mounted) { this.setState({ - progress: 100 + progress: 100, }, () => { // need to wait a bit for the progress circle UI to update to the give progress this.openDocument(file); @@ -165,26 +165,26 @@ export default class FileAttachmentDocument extends PureComponent { url: `${prefix}${path}`, fileName: file.name, fileType: file.extension, - cache: false + cache: false, }], (error) => { if (error) { const {intl} = this.context; Alert.alert( intl.formatMessage({ id: 'mobile.document_preview.failed_title', - defaultMessage: 'Open Document failed' + defaultMessage: 'Open Document failed', }), intl.formatMessage({ id: 'mobile.document_preview.failed_description', - defaultMessage: 'An error occurred while opening the document. Please make sure you have a {fileType} viewer installed and try again.\n' + defaultMessage: 'An error occurred while opening the document. Please make sure you have a {fileType} viewer installed and try again.\n', }, { - fileType: file.extension.toUpperCase() + fileType: file.extension.toUpperCase(), }), [{ text: intl.formatMessage({ id: 'mobile.server_upgrade.button', - defaultMessage: 'OK' - }) + defaultMessage: 'OK', + }), }] ); RNFetchBlob.fs.unlink(path); @@ -199,7 +199,7 @@ export default class FileAttachmentDocument extends PureComponent { if (this.mounted) { this.setState({ progress: 0, - didCancel: true + didCancel: true, }, () => { // need to wait a bit for the progress circle UI to update to the give progress setTimeout(() => this.setState({downloading: false}), 2000); @@ -230,17 +230,17 @@ export default class FileAttachmentDocument extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.downloader.failed_title', - defaultMessage: 'Download failed' + defaultMessage: 'Download failed', }), intl.formatMessage({ id: 'mobile.downloader.failed_description', - defaultMessage: 'An error occurred while downloading the file. Please check your internet connection and try again.\n' + defaultMessage: 'An error occurred while downloading the file. Please check your internet connection and try again.\n', }), [{ text: intl.formatMessage({ id: 'mobile.server_upgrade.button', - defaultMessage: 'OK' - }) + defaultMessage: 'OK', + }), }] ); }; @@ -290,7 +290,7 @@ const style = StyleSheet.create({ alignItems: 'center', height: '100%', justifyContent: 'center', - width: '100%' + width: '100%', }, circularProgressContent: { alignItems: 'center', @@ -298,6 +298,6 @@ const style = StyleSheet.create({ justifyContent: 'center', left: 0, position: 'absolute', - top: 0 - } + top: 0, + }, }); diff --git a/app/components/file_attachment_list/file_attachment_icon.js b/app/components/file_attachment_list/file_attachment_icon.js index 33949ac09..266c2bf26 100644 --- a/app/components/file_attachment_list/file_attachment_icon.js +++ b/app/components/file_attachment_list/file_attachment_icon.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { View, Image, - StyleSheet + StyleSheet, } from 'react-native'; import * as Utils from 'mattermost-redux/utils/file_utils'; @@ -32,7 +32,7 @@ const ICON_PATH_FROM_FILE_TYPE = { presentation: pptIcon, spreadsheet: excelIcon, video: videoIcon, - word: wordIcon + word: wordIcon, }; export default class FileAttachmentIcon extends PureComponent { @@ -41,14 +41,14 @@ export default class FileAttachmentIcon extends PureComponent { iconHeight: PropTypes.number, iconWidth: PropTypes.number, wrapperHeight: PropTypes.number, - wrapperWidth: PropTypes.number + wrapperWidth: PropTypes.number, }; static defaultProps = { iconHeight: 60, iconWidth: 60, wrapperHeight: 100, - wrapperWidth: 100 + wrapperWidth: 100, }; getFileIconPath(file) { @@ -76,6 +76,6 @@ const styles = StyleSheet.create({ fileIconWrapper: { alignItems: 'center', justifyContent: 'center', - backgroundColor: '#fff' - } + backgroundColor: '#fff', + }, }); diff --git a/app/components/file_attachment_list/file_attachment_image.js b/app/components/file_attachment_list/file_attachment_image.js index 4684d8395..9c37f28ac 100644 --- a/app/components/file_attachment_list/file_attachment_image.js +++ b/app/components/file_attachment_list/file_attachment_image.js @@ -8,7 +8,7 @@ import { Animated, View, Image, - StyleSheet + StyleSheet, } from 'react-native'; import {Client4} from 'mattermost-redux/client'; @@ -20,7 +20,7 @@ const {View: AnimatedView} = Animated; const IMAGE_SIZE = { Fullsize: 'fullsize', Preview: 'preview', - Thumbnail: 'thumbnail' + Thumbnail: 'thumbnail', }; export default class FileAttachmentImage extends PureComponent { @@ -32,7 +32,7 @@ export default class FileAttachmentImage extends PureComponent { imageSize: PropTypes.oneOf([ IMAGE_SIZE.Fullsize, IMAGE_SIZE.Preview, - IMAGE_SIZE.Thumbnail + IMAGE_SIZE.Thumbnail, ]), imageWidth: PropTypes.number, loadingBackgroundColor: PropTypes.string, @@ -40,7 +40,7 @@ export default class FileAttachmentImage extends PureComponent { resizeMethod: PropTypes.string, wrapperBackgroundColor: PropTypes.string, wrapperHeight: PropTypes.number, - wrapperWidth: PropTypes.number + wrapperWidth: PropTypes.number, }; static defaultProps = { @@ -54,13 +54,13 @@ export default class FileAttachmentImage extends PureComponent { resizeMethod: 'resize', wrapperBackgroundColor: '#fff', wrapperHeigh: 100, - wrapperWidth: 100 + wrapperWidth: 100, }; state = { opacity: new Animated.Value(0), requesting: true, - retry: 0 + retry: 0, }; // Sometimes the request after a file upload errors out. @@ -71,7 +71,7 @@ export default class FileAttachmentImage extends PureComponent { setTimeout(() => { this.setState({ retry: (this.state.retry + 1), - timestamp: Date.now() + timestamp: Date.now(), }); }, 300); } @@ -79,12 +79,12 @@ export default class FileAttachmentImage extends PureComponent { handleLoad = () => { this.setState({ - requesting: false + requesting: false, }); Animated.timing(this.state.opacity, { toValue: 1, - duration: 300 + duration: 300, }).start(() => { this.props.addFileToFetchCache(this.handleGetImageURL()); }); @@ -92,7 +92,7 @@ export default class FileAttachmentImage extends PureComponent { handleLoadStart = () => { this.setState({ - requesting: true + requesting: true, }); }; @@ -137,7 +137,7 @@ export default class FileAttachmentImage extends PureComponent { resizeMode, wrapperBackgroundColor, wrapperHeight, - wrapperWidth + wrapperWidth, } = this.props; let source = {}; @@ -155,7 +155,7 @@ export default class FileAttachmentImage extends PureComponent { const imageComponentLoaders = { onError: isInFetchCache ? null : this.handleLoadError, onLoadStart: isInFetchCache ? null : this.handleLoadStart, - onLoad: isInFetchCache ? null : this.handleLoad + onLoad: isInFetchCache ? null : this.handleLoad, }; const opacity = isInFetchCache ? 1 : this.state.opacity; @@ -192,13 +192,13 @@ export default class FileAttachmentImage extends PureComponent { const style = StyleSheet.create({ fileImageWrapper: { alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, loaderContainer: { position: 'absolute', height: '100%', width: '100%', alignItems: 'center', - justifyContent: 'center' - } + justifyContent: 'center', + }, }); diff --git a/app/components/file_attachment_list/file_attachment_list.js b/app/components/file_attachment_list/file_attachment_list.js index 97e9c0959..ba550b851 100644 --- a/app/components/file_attachment_list/file_attachment_list.js +++ b/app/components/file_attachment_list/file_attachment_list.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Keyboard, View, - TouchableOpacity + TouchableOpacity, } from 'react-native'; import {RequestStatus} from 'mattermost-redux/constants'; @@ -28,7 +28,7 @@ export default class FileAttachmentList extends Component { postId: PropTypes.string.isRequired, theme: PropTypes.object.isRequired, toggleSelected: PropTypes.func.isRequired, - filesForPostRequest: PropTypes.object.isRequired + filesForPostRequest: PropTypes.object.isRequired, }; componentDidMount() { @@ -52,15 +52,15 @@ export default class FileAttachmentList extends Component { animationType: 'none', passProps: { fileId, - postId + postId, }, navigatorStyle: { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, screenBackgroundColor: 'black', - modalPresentationStyle: 'overCurrentContext' - } + modalPresentationStyle: 'overCurrentContext', + }, }); }; diff --git a/app/components/file_attachment_list/index.js b/app/components/file_attachment_list/index.js index f23bbd54d..1019032ef 100644 --- a/app/components/file_attachment_list/index.js +++ b/app/components/file_attachment_list/index.js @@ -18,7 +18,7 @@ function makeMapStateToProps() { fetchCache: state.views.fetchCache, files: getFilesForPost(state, ownProps.postId), theme: getTheme(state), - filesForPostRequest: state.requests.files.getFilesForPost + filesForPostRequest: state.requests.files.getFilesForPost, }; }; } @@ -27,8 +27,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ addFileToFetchCache, - loadFilesForPostIfNecessary - }, dispatch) + loadFilesForPostIfNecessary, + }, dispatch), }; } diff --git a/app/components/file_upload_preview/file_upload_preview.js b/app/components/file_upload_preview/file_upload_preview.js index 06de8c885..be4f21b86 100644 --- a/app/components/file_upload_preview/file_upload_preview.js +++ b/app/components/file_upload_preview/file_upload_preview.js @@ -8,7 +8,7 @@ import { ScrollView, StyleSheet, TouchableOpacity, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; @@ -21,7 +21,7 @@ export default class FileUploadPreview extends PureComponent { actions: PropTypes.shape({ addFileToFetchCache: PropTypes.func.isRequired, handleRemoveFile: PropTypes.func.isRequired, - retryFileUpload: PropTypes.func.isRequired + retryFileUpload: PropTypes.func.isRequired, }).isRequired, channelId: PropTypes.string.isRequired, channelIsLoading: PropTypes.bool, @@ -33,7 +33,7 @@ export default class FileUploadPreview extends PureComponent { rootId: PropTypes.string, theme: PropTypes.object.isRequired, filesUploadingForCurrentChannel: PropTypes.bool.isRequired, - showFileMaxWarning: PropTypes.bool.isRequired + showFileMaxWarning: PropTypes.bool.isRequired, }; handleRetryFileUpload = (file) => { @@ -105,7 +105,7 @@ export default class FileUploadPreview extends PureComponent { channelIsLoading, filesUploadingForCurrentChannel, deviceHeight, - files + files, } = this.props; if (channelIsLoading || (!files.length && !filesUploadingForCurrentChannel)) { return null; @@ -141,7 +141,7 @@ const style = StyleSheet.create({ left: 0, bottom: 0, position: 'absolute', - width: '100%' + width: '100%', }, failed: { backgroundColor: 'rgba(0, 0, 0, 0.8)', @@ -149,12 +149,12 @@ const style = StyleSheet.create({ height: '100%', width: '100%', alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, preview: { justifyContent: 'flex-end', height: 115, - width: 115 + width: 115, }, previewShadow: { height: 100, @@ -168,18 +168,18 @@ const style = StyleSheet.create({ shadowRadius: 4, shadowOffset: { width: 0, - height: 0 - } - } - }) + height: 0, + }, + }, + }), }, removeButtonIcon: Platform.select({ ios: { - marginTop: 2 + marginTop: 2, }, android: { - marginLeft: 1 - } + marginLeft: 1, + }, }), removeButtonWrapper: { alignItems: 'center', @@ -194,19 +194,19 @@ const style = StyleSheet.create({ borderRadius: 12, backgroundColor: '#000', borderWidth: 1, - borderColor: '#fff' + borderColor: '#fff', }, scrollView: { flex: 1, - marginBottom: 12 + marginBottom: 12, }, scrollViewContent: { alignItems: 'flex-end', - marginLeft: 14 + marginLeft: 14, }, warning: { color: 'white', marginLeft: 14, - marginBottom: 12 - } + marginBottom: 12, + }, }); diff --git a/app/components/file_upload_preview/index.js b/app/components/file_upload_preview/index.js index 9e979cfb4..42448023e 100644 --- a/app/components/file_upload_preview/index.js +++ b/app/components/file_upload_preview/index.js @@ -38,7 +38,7 @@ function mapStateToProps(state, ownProps) { deviceHeight, fetchCache: state.views.fetchCache, filesUploadingForCurrentChannel: checkForFileUploadingInChannel(state, ownProps.channelId, ownProps.rootId), - theme: getTheme(state) + theme: getTheme(state), }; } @@ -47,8 +47,8 @@ function mapDispatchToProps(dispatch) { actions: bindActionCreators({ addFileToFetchCache, handleRemoveFile, - retryFileUpload - }, dispatch) + retryFileUpload, + }, dispatch), }; } diff --git a/app/components/flag_icon.js b/app/components/flag_icon.js index b94f79b89..a34a2158f 100644 --- a/app/components/flag_icon.js +++ b/app/components/flag_icon.js @@ -9,7 +9,7 @@ export default class FlagIcon extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/formatted_date.js b/app/components/formatted_date.js index 0e9c58b1a..94d6ea315 100644 --- a/app/components/formatted_date.js +++ b/app/components/formatted_date.js @@ -11,7 +11,7 @@ class FormattedDate extends React.PureComponent { intl: intlShape.isRequired, value: PropTypes.any.isRequired, format: PropTypes.string, - children: PropTypes.func + children: PropTypes.func, }; render() { diff --git a/app/components/formatted_text.js b/app/components/formatted_text.js index 37f6e53c1..9c1f59bd9 100644 --- a/app/components/formatted_text.js +++ b/app/components/formatted_text.js @@ -11,11 +11,11 @@ class FormattedText extends React.PureComponent { intl: intlShape.isRequired, id: PropTypes.string.isRequired, defaultMessage: PropTypes.string, - values: PropTypes.object + values: PropTypes.object, }; static defaultProps = { - defaultMessage: '' + defaultMessage: '', }; render() { diff --git a/app/components/formatted_time.js b/app/components/formatted_time.js index 1a62896bb..cb6c95998 100644 --- a/app/components/formatted_time.js +++ b/app/components/formatted_time.js @@ -11,7 +11,7 @@ class FormattedTime extends React.PureComponent { intl: intlShape.isRequired, value: PropTypes.any.isRequired, format: PropTypes.string, - children: PropTypes.func + children: PropTypes.func, }; render() { diff --git a/app/components/layout/keyboard_layout/index.js b/app/components/layout/keyboard_layout/index.js index 2a04a196f..4d10f39d4 100644 --- a/app/components/layout/keyboard_layout/index.js +++ b/app/components/layout/keyboard_layout/index.js @@ -12,7 +12,7 @@ import KeyboardLayout from './keyboard_layout'; function mapStateToProps(state) { return { statusBarHeight: getStatusBarHeight(state), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/layout/keyboard_layout/keyboard_layout.js b/app/components/layout/keyboard_layout/keyboard_layout.js index e155c6a1d..6a3377b65 100644 --- a/app/components/layout/keyboard_layout/keyboard_layout.js +++ b/app/components/layout/keyboard_layout/keyboard_layout.js @@ -13,11 +13,11 @@ export default class KeyboardLayout extends PureComponent { static propTypes = { children: PropTypes.node, statusBarHeight: PropTypes.number, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - keyboardVerticalOffset: 0 + keyboardVerticalOffset: 0, }; constructor(props) { @@ -25,7 +25,7 @@ export default class KeyboardLayout extends PureComponent { this.subscriptions = []; this.count = 0; this.state = { - bottom: new Animated.Value(0) + bottom: new Animated.Value(0), }; } @@ -33,7 +33,7 @@ export default class KeyboardLayout extends PureComponent { if (Platform.OS === 'ios') { this.subscriptions = [ Keyboard.addListener('keyboardWillChangeFrame', this.onKeyboardChange), - Keyboard.addListener('keyboardWillHide', this.onKeyboardWillHide) + Keyboard.addListener('keyboardWillHide', this.onKeyboardWillHide), ]; } } @@ -46,7 +46,7 @@ export default class KeyboardLayout extends PureComponent { const {duration} = e; Animated.timing(this.state.bottom, { toValue: 0, - duration + duration, }).start(); }; @@ -60,7 +60,7 @@ export default class KeyboardLayout extends PureComponent { const {height} = endCoordinates; Animated.timing(this.state.bottom, { toValue: height, - duration + duration, }).start(); }; @@ -94,7 +94,7 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { keyboardLayout: { position: 'relative', backgroundColor: theme.centerChannelBg, - flex: 1 - } + flex: 1, + }, }; }); diff --git a/app/components/loading.js b/app/components/loading.js index f5ebb4510..9a311045a 100644 --- a/app/components/loading.js +++ b/app/components/loading.js @@ -8,20 +8,20 @@ import { ActivityIndicator, StyleSheet, View, - ViewPropTypes + ViewPropTypes, } from 'react-native'; export default class Loading extends PureComponent { static propTypes = { size: PropTypes.string, color: PropTypes.string, - style: ViewPropTypes.style + style: ViewPropTypes.style, }; static defaultProps = { size: 'large', color: 'grey', - style: {} + style: {}, }; render() { @@ -42,10 +42,10 @@ const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', - alignItems: 'center' + alignItems: 'center', }, loading: { - marginLeft: 3 - } + marginLeft: 3, + }, }); diff --git a/app/components/markdown/index.js b/app/components/markdown/index.js index dcbd63e96..0da00c0f1 100644 --- a/app/components/markdown/index.js +++ b/app/components/markdown/index.js @@ -9,7 +9,7 @@ import Markdown from './markdown'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/markdown/markdown.js b/app/components/markdown/markdown.js index 25a914b01..c413debce 100644 --- a/app/components/markdown/markdown.js +++ b/app/components/markdown/markdown.js @@ -8,7 +8,7 @@ import PropTypes from 'prop-types'; import { Platform, Text, - View + View, } from 'react-native'; import AtMention from 'app/components/at_mention'; @@ -41,13 +41,13 @@ export default class Markdown extends PureComponent { onPostPress: PropTypes.func, textStyles: PropTypes.object, theme: PropTypes.object.isRequired, - value: PropTypes.string.isRequired + value: PropTypes.string.isRequired, }; static defaultProps = { textStyles: {}, blockStyles: {}, - onLongPress: () => true + onLongPress: () => true, }; constructor(props) { @@ -91,17 +91,17 @@ export default class Markdown extends PureComponent { table_row: MarkdownTableRow, table_cell: MarkdownTableCell, - editedIndicator: this.renderEditedIndicator + editedIndicator: this.renderEditedIndicator, }, renderParagraphsInLists: true, - getExtraPropsForNode: this.getExtraPropsForNode + getExtraPropsForNode: this.getExtraPropsForNode, }); } getExtraPropsForNode = (node) => { const extraProps = { continue: node.continue, - index: node.index + index: node.index, }; if (node.type === 'image') { @@ -215,7 +215,7 @@ export default class Markdown extends PureComponent { renderHeading = ({children, level}) => { const containerStyle = [ getStyleSheet(this.props.theme).block, - this.props.blockStyles[`heading${level}`] + this.props.blockStyles[`heading${level}`], ]; const textStyle = this.props.blockStyles[`heading${level}Text`]; return ( @@ -335,7 +335,7 @@ export default class Markdown extends PureComponent { const style = getStyleSheet(this.props.theme); const styles = [ this.props.baseTextStyle, - style.editedIndicatorText + style.editedIndicatorText, ]; return ( @@ -378,22 +378,22 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { // so we calculate the resulting colour manually const editedOpacity = Platform.select({ ios: 0.3, - android: 1.0 + android: 1.0, }); const editedColor = Platform.select({ ios: theme.centerChannelColor, - android: blendColors(theme.centerChannelBg, theme.centerChannelColor, 0.3) + android: blendColors(theme.centerChannelBg, theme.centerChannelColor, 0.3), }); return { block: { alignItems: 'flex-start', flexDirection: 'row', - flexWrap: 'wrap' + flexWrap: 'wrap', }, editedIndicatorText: { color: editedColor, - opacity: editedOpacity - } + opacity: editedOpacity, + }, }; }); diff --git a/app/components/markdown/markdown_block_quote.js b/app/components/markdown/markdown_block_quote.js index 9be6c5ec3..254fbc01f 100644 --- a/app/components/markdown/markdown_block_quote.js +++ b/app/components/markdown/markdown_block_quote.js @@ -5,7 +5,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { StyleSheet, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -15,7 +15,7 @@ export default class MarkdownBlockQuote extends PureComponent { static propTypes = { continue: PropTypes.bool, iconStyle: CustomPropTypes.Style, - children: CustomPropTypes.Children.isRequired + children: CustomPropTypes.Children.isRequired, }; render() { @@ -46,12 +46,12 @@ export default class MarkdownBlockQuote extends PureComponent { const style = StyleSheet.create({ container: { alignItems: 'flex-start', - flexDirection: 'row' + flexDirection: 'row', }, childContainer: { - flex: 1 + flex: 1, }, icon: { - width: 23 - } + width: 23, + }, }); diff --git a/app/components/markdown/markdown_code_block/index.js b/app/components/markdown/markdown_code_block/index.js index 5d7d8f7b7..0188ff954 100644 --- a/app/components/markdown/markdown_code_block/index.js +++ b/app/components/markdown/markdown_code_block/index.js @@ -9,7 +9,7 @@ import MarkdownCodeBlock from './markdown_code_block'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/markdown/markdown_code_block/markdown_code_block.js b/app/components/markdown/markdown_code_block/markdown_code_block.js index 976a7d570..bcc2da9c5 100644 --- a/app/components/markdown/markdown_code_block/markdown_code_block.js +++ b/app/components/markdown/markdown_code_block/markdown_code_block.js @@ -9,7 +9,7 @@ import { StyleSheet, Text, TouchableOpacity, - View + View, } from 'react-native'; import CustomPropTypes from 'app/constants/custom_prop_types'; @@ -29,11 +29,11 @@ class MarkdownCodeBlock extends React.PureComponent { language: PropTypes.string, content: PropTypes.string.isRequired, textStyle: CustomPropTypes.Style, - onLongPress: PropTypes.func.isRequired + onLongPress: PropTypes.func.isRequired, }; static defaultProps = { - language: '' + language: '', }; handlePress = wrapWithPreventDoubleTap(() => { @@ -45,16 +45,16 @@ class MarkdownCodeBlock extends React.PureComponent { title = intl.formatMessage( { id: 'mobile.routes.code', - defaultMessage: '{language} Code' + defaultMessage: '{language} Code', }, { - language: languageDisplayName + language: languageDisplayName, } ); } else { title = intl.formatMessage({ id: 'mobile.routes.code.noLanguage', - defaultMessage: 'Code' + defaultMessage: 'Code', }); } @@ -64,14 +64,14 @@ class MarkdownCodeBlock extends React.PureComponent { animated: true, backButtonTitle: '', passProps: { - content: this.props.content + content: this.props.content, }, navigatorStyle: { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); @@ -84,7 +84,7 @@ class MarkdownCodeBlock extends React.PureComponent { if (config.copyAndPasteProtection !== 'true') { action = { text: formatMessage({id: 'mobile.markdown.code.copy_code', defaultMessage: 'Copy Code'}), - onPress: this.handleCopyCode + onPress: this.handleCopyCode, }; } @@ -102,13 +102,13 @@ class MarkdownCodeBlock extends React.PureComponent { if (numberOfLines > MAX_LINES) { return { content: lines.slice(0, MAX_LINES).join('\n'), - numberOfLines + numberOfLines, }; } return { content, - numberOfLines + numberOfLines, }; }; @@ -147,7 +147,7 @@ class MarkdownCodeBlock extends React.PureComponent { id='mobile.markdown.code.plusMoreLines' defaultMessage='+{count, number} more {count, plural, one {line} other {lines}}' values={{ - count: numberOfLines - MAX_LINES + count: numberOfLines - MAX_LINES, }} /> ); @@ -185,7 +185,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderColor: changeOpacity(theme.centerChannelColor, 0.15), borderRadius: 3, borderWidth: StyleSheet.hairlineWidth, - flexDirection: 'row' + flexDirection: 'row', }, lineNumbers: { alignItems: 'center', @@ -195,32 +195,32 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flexDirection: 'column', justifyContent: 'flex-start', paddingVertical: 4, - width: 21 + width: 21, }, lineNumbersText: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 12, - lineHeight: 18 + lineHeight: 18, }, rightColumn: { flexDirection: 'column', flex: 1, paddingHorizontal: 6, - paddingVertical: 4 + paddingVertical: 4, }, code: { flexDirection: 'row', - overflow: 'scroll' // Doesn't actually cause a scrollbar, but stops text from wrapping + overflow: 'scroll', // Doesn't actually cause a scrollbar, but stops text from wrapping }, codeText: { color: changeOpacity(theme.centerChannelColor, 0.65), fontSize: 12, - lineHeight: 18 + lineHeight: 18, }, plusMoreLinesText: { color: changeOpacity(theme.centerChannelColor, 0.4), fontSize: 11, - marginTop: 2 + marginTop: 2, }, language: { alignItems: 'center', @@ -230,12 +230,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { padding: 6, position: 'absolute', right: 0, - top: 0 + top: 0, }, languageText: { color: theme.sidebarHeaderTextColor, - fontSize: 12 - } + fontSize: 12, + }, }; }); diff --git a/app/components/markdown/markdown_image/index.js b/app/components/markdown/markdown_image/index.js index 493f7e5f6..fd835145e 100644 --- a/app/components/markdown/markdown_image/index.js +++ b/app/components/markdown/markdown_image/index.js @@ -9,7 +9,7 @@ import MarkdownImage from './markdown_image'; function mapStateToProps(state) { return { - serverURL: getCurrentUrl(state) + serverURL: getCurrentUrl(state), }; } diff --git a/app/components/markdown/markdown_image/markdown_image.js b/app/components/markdown/markdown_image/markdown_image.js index 9ceefd529..3c73e29c0 100644 --- a/app/components/markdown/markdown_image/markdown_image.js +++ b/app/components/markdown/markdown_image/markdown_image.js @@ -12,7 +12,7 @@ import { StyleSheet, Text, TouchableHighlight, - View + View, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -33,11 +33,11 @@ export default class MarkdownImage extends React.Component { onLongPress: PropTypes.func, serverURL: PropTypes.string.isRequired, source: PropTypes.string.isRequired, - errorTextStyle: CustomPropTypes.Style + errorTextStyle: CustomPropTypes.Style, }; static contextTypes = { - intl: intlShape.isRequired + intl: intlShape.isRequired, }; constructor(props) { @@ -47,7 +47,7 @@ export default class MarkdownImage extends React.Component { width: 0, height: 0, maxWidth: Math.MAX_INT, - failed: false + failed: false, }; this.mounted = false; @@ -66,7 +66,7 @@ export default class MarkdownImage extends React.Component { this.setState({ width: 0, height: 0, - failed: false + failed: false, }); // getSource also depends on serverURL, but that shouldn't change while this is mounted @@ -99,7 +99,7 @@ export default class MarkdownImage extends React.Component { this.setState({ width, - height + height, }); }; @@ -109,7 +109,7 @@ export default class MarkdownImage extends React.Component { } this.setState({ - failed: true + failed: true, }); }; @@ -119,7 +119,7 @@ export default class MarkdownImage extends React.Component { } this.setState({ - maxWidth: event.nativeEvent.layout.width + maxWidth: event.nativeEvent.layout.width, }); }; @@ -142,7 +142,7 @@ export default class MarkdownImage extends React.Component { if (config.copyAndPasteProtection !== 'true') { action = { text: formatMessage({id: 'mobile.markdown.link.copy_url', defaultMessage: 'Copy URL'}), - onPress: this.handleLinkCopy + onPress: this.handleLinkCopy, }; } @@ -169,7 +169,7 @@ export default class MarkdownImage extends React.Component { defaultMessage='Image exceeds max dimensions of {maxWidth} by {maxHeight}:' values={{ maxWidth: ANDROID_MAX_WIDTH, - maxHeight: ANDROID_MAX_HEIGHT + maxHeight: ANDROID_MAX_HEIGHT, }} /> {' '} @@ -235,9 +235,9 @@ export default class MarkdownImage extends React.Component { const style = StyleSheet.create({ container: { - flex: 1 + flex: 1, }, image: { - marginVertical: 5 - } + marginVertical: 5, + }, }); diff --git a/app/components/markdown/markdown_link.js b/app/components/markdown/markdown_link.js index bf93b5698..072b08ea2 100644 --- a/app/components/markdown/markdown_link.js +++ b/app/components/markdown/markdown_link.js @@ -18,15 +18,15 @@ export default class MarkdownLink extends PureComponent { static propTypes = { children: CustomPropTypes.Children.isRequired, href: PropTypes.string.isRequired, - onLongPress: PropTypes.func + onLongPress: PropTypes.func, }; static defaultProps = { - onLongPress: () => true + onLongPress: () => true, }; static contextTypes = { - intl: intlShape.isRequired + intl: intlShape.isRequired, }; handlePress = () => { @@ -67,12 +67,12 @@ export default class MarkdownLink extends PureComponent { const nextProps = { literal: this.parseLinkLiteral(literal), - ...otherProps + ...otherProps, }; return { props: nextProps, - ...otherChildProps + ...otherChildProps, }; }); } @@ -86,7 +86,7 @@ export default class MarkdownLink extends PureComponent { if (config.copyAndPasteProtection !== 'true') { action = { text: formatMessage({id: 'mobile.markdown.link.copy_url', defaultMessage: 'Copy URL'}), - onPress: this.handleCopyURL + onPress: this.handleCopyURL, }; } diff --git a/app/components/markdown/markdown_list.js b/app/components/markdown/markdown_list.js index 65f9d5a00..70b9a6e58 100644 --- a/app/components/markdown/markdown_list.js +++ b/app/components/markdown/markdown_list.js @@ -10,11 +10,11 @@ export default class MarkdownList extends PureComponent { children: PropTypes.node.isRequired, ordered: PropTypes.bool.isRequired, start: PropTypes.number, - tight: PropTypes.bool + tight: PropTypes.bool, }; static defaultProps = { - start: 1 + start: 1, }; render() { @@ -28,7 +28,7 @@ export default class MarkdownList extends PureComponent { return React.cloneElement(child, { bulletWidth, ordered: this.props.ordered, - tight: this.props.tight + tight: this.props.tight, }); }); @@ -42,6 +42,6 @@ export default class MarkdownList extends PureComponent { const style = StyleSheet.create({ indent: { - marginRight: 20 - } + marginRight: 20, + }, }); diff --git a/app/components/markdown/markdown_list_item.js b/app/components/markdown/markdown_list_item.js index ba3cde313..e19b6d7b6 100644 --- a/app/components/markdown/markdown_list_item.js +++ b/app/components/markdown/markdown_list_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { StyleSheet, Text, - View + View, } from 'react-native'; import CustomPropTypes from 'app/constants/custom_prop_types'; @@ -19,7 +19,7 @@ export default class MarkdownListItem extends PureComponent { index: PropTypes.number.isRequired, bulletWidth: PropTypes.number, bulletStyle: CustomPropTypes.Style, - level: PropTypes.number + level: PropTypes.number, }; render() { @@ -52,10 +52,10 @@ export default class MarkdownListItem extends PureComponent { const style = StyleSheet.create({ bullet: { alignItems: 'flex-end', - marginRight: 5 + marginRight: 5, }, container: { flexDirection: 'row', - alignItems: 'flex-start' - } + alignItems: 'flex-start', + }, }); diff --git a/app/components/markdown/markdown_table/index.js b/app/components/markdown/markdown_table/index.js index fcdc0f153..9ebce02c9 100644 --- a/app/components/markdown/markdown_table/index.js +++ b/app/components/markdown/markdown_table/index.js @@ -9,7 +9,7 @@ import MarkdownTable from './markdown_table'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/markdown/markdown_table/markdown_table.js b/app/components/markdown/markdown_table/markdown_table.js index 46b4a690b..f1c6aa90e 100644 --- a/app/components/markdown/markdown_table/markdown_table.js +++ b/app/components/markdown/markdown_table/markdown_table.js @@ -7,7 +7,7 @@ import {intlShape} from 'react-intl'; import { ScrollView, TouchableOpacity, - View + View, } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; @@ -20,18 +20,18 @@ export default class MarkdownTable extends React.PureComponent { static propTypes = { children: PropTypes.node.isRequired, navigator: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape.isRequired + intl: intlShape.isRequired, }; constructor(props) { super(props); this.state = { - contentCutOff: true + contentCutOff: true, }; } @@ -42,25 +42,25 @@ export default class MarkdownTable extends React.PureComponent { screen: 'Table', title: this.context.intl.formatMessage({ id: 'mobile.routes.table', - defaultMessage: 'Table' + defaultMessage: 'Table', }), animated: true, backButtonTitle: '', passProps: { - renderRows: this.renderRows + renderRows: this.renderRows, }, navigatorStyle: { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); handleContentHeightChange = (contentWidth, contentHeight) => { this.setState({ - contentCutOff: contentHeight >= MAX_HEIGHT + contentCutOff: contentHeight >= MAX_HEIGHT, }); } @@ -76,7 +76,7 @@ export default class MarkdownTable extends React.PureComponent { // since the container should be rendering that const rows = React.Children.toArray(this.props.children); rows[rows.length - 1] = React.cloneElement(rows[rows.length - 1], { - isLastRow: true + isLastRow: true, }); return ( @@ -95,7 +95,7 @@ export default class MarkdownTable extends React.PureComponent { @@ -123,24 +123,24 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { container: { borderBottomWidth: 1, borderColor: changeOpacity(theme.centerChannelColor, 0.2), - maxHeight: MAX_HEIGHT + maxHeight: MAX_HEIGHT, }, table: { borderColor: changeOpacity(theme.centerChannelColor, 0.2), borderLeftWidth: 1, // The right border is drawn by the MarkdownTableCell component borderTopWidth: 1, - flex: 1 + flex: 1, }, tableBottomBorder: { borderBottomWidth: 1, - borderColor: changeOpacity(theme.centerChannelColor, 0.2) + borderColor: changeOpacity(theme.centerChannelColor, 0.2), }, moreIndicator: { bottom: 0, height: 20, position: 'absolute', right: 0, - width: '100%' - } + width: '100%', + }, }; }); diff --git a/app/components/markdown/markdown_table_cell/index.js b/app/components/markdown/markdown_table_cell/index.js index 83ec705f8..86a867039 100644 --- a/app/components/markdown/markdown_table_cell/index.js +++ b/app/components/markdown/markdown_table_cell/index.js @@ -9,7 +9,7 @@ import MarkdownTableCell from './markdown_table_cell'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/markdown/markdown_table_cell/markdown_table_cell.js b/app/components/markdown/markdown_table_cell/markdown_table_cell.js index 445700cce..a804885dc 100644 --- a/app/components/markdown/markdown_table_cell/markdown_table_cell.js +++ b/app/components/markdown/markdown_table_cell/markdown_table_cell.js @@ -11,7 +11,7 @@ export default class MarkdownTableCell extends React.PureComponent { static propTypes = { children: PropTypes.node, isHeading: PropTypes.bool.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { @@ -40,7 +40,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flex: 1, justifyContent: 'flex-start', paddingHorizontal: 13, - paddingVertical: 6 - } + paddingVertical: 6, + }, }; }); diff --git a/app/components/markdown/markdown_table_image/index.js b/app/components/markdown/markdown_table_image/index.js index 4e7400b3f..31a60e87b 100644 --- a/app/components/markdown/markdown_table_image/index.js +++ b/app/components/markdown/markdown_table_image/index.js @@ -11,7 +11,7 @@ import MarkdownTableImage from './markdown_table_image'; function mapStateToProps(state) { return { serverURL: getCurrentUrl(state), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/markdown/markdown_table_image/markdown_table_image.js b/app/components/markdown/markdown_table_image/markdown_table_image.js index 6b02951e2..0b50500fe 100644 --- a/app/components/markdown/markdown_table_image/markdown_table_image.js +++ b/app/components/markdown/markdown_table_image/markdown_table_image.js @@ -16,11 +16,11 @@ export default class MarkdownTableImage extends React.PureComponent { textStyle: CustomPropTypes.Style.isRequired, navigator: PropTypes.object.isRequired, serverURL: PropTypes.string.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape.isRequired + intl: intlShape.isRequired, }; handlePress = wrapWithPreventDoubleTap(() => { @@ -30,19 +30,19 @@ export default class MarkdownTableImage extends React.PureComponent { screen: 'TableImage', title: this.context.intl.formatMessage({ id: 'mobile.routes.tableImage', - defaultMessage: 'Image' + defaultMessage: 'Image', }), animated: true, backButtonTitle: '', passProps: { - imageSource: this.getImageSource() + imageSource: this.getImageSource(), }, navigatorStyle: { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); diff --git a/app/components/markdown/markdown_table_row/index.js b/app/components/markdown/markdown_table_row/index.js index 9cae21d02..0040c4f73 100644 --- a/app/components/markdown/markdown_table_row/index.js +++ b/app/components/markdown/markdown_table_row/index.js @@ -9,7 +9,7 @@ import MarkdownTableRow from './markdown_table_row'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/markdown/markdown_table_row/markdown_table_row.js b/app/components/markdown/markdown_table_row/markdown_table_row.js index 8ff62657d..0fa2443cd 100644 --- a/app/components/markdown/markdown_table_row/markdown_table_row.js +++ b/app/components/markdown/markdown_table_row/markdown_table_row.js @@ -11,7 +11,7 @@ export default class MarkdownTableRow extends React.PureComponent { static propTypes = { children: PropTypes.node, isLastRow: PropTypes.bool, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { @@ -31,11 +31,11 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { row: { flex: 1, flexDirection: 'row', - justifyContent: 'flex-start' + justifyContent: 'flex-start', }, rowBottomBorder: { borderColor: changeOpacity(theme.centerChannelColor, 0.2), - borderBottomWidth: 1 - } + borderBottomWidth: 1, + }, }; }); diff --git a/app/components/offline_indicator/index.js b/app/components/offline_indicator/index.js index 5fd1e461f..c1d9a2355 100644 --- a/app/components/offline_indicator/index.js +++ b/app/components/offline_indicator/index.js @@ -20,7 +20,7 @@ function mapStateToProps(state) { isConnecting, isLandscape: isLandscape(state), isOnline: getConnection(state), - webSocketStatus + webSocketStatus, }; } @@ -28,8 +28,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ connection, - initWebSocket - }, dispatch) + initWebSocket, + }, dispatch), }; } diff --git a/app/components/offline_indicator/offline_indicator.js b/app/components/offline_indicator/offline_indicator.js index 3684d9f5f..b98b979b9 100644 --- a/app/components/offline_indicator/offline_indicator.js +++ b/app/components/offline_indicator/offline_indicator.js @@ -9,7 +9,7 @@ import { Platform, StyleSheet, TouchableOpacity, - View + View, } from 'react-native'; import DeviceInfo from 'react-native-device-info'; import IonIcon from 'react-native-vector-icons/Ionicons'; @@ -30,19 +30,19 @@ const { IOS_TOP_LANDSCAPE, IOS_TOP_PORTRAIT, IOSX_TOP_PORTRAIT, - STATUS_BAR_HEIGHT + STATUS_BAR_HEIGHT, } = ViewTypes; export default class OfflineIndicator extends Component { static propTypes = { actions: PropTypes.shape({ connection: PropTypes.func.isRequired, - initWebSocket: PropTypes.func.isRequired + initWebSocket: PropTypes.func.isRequired, }).isRequired, isConnecting: PropTypes.bool, isLandscape: PropTypes.bool, isOnline: PropTypes.bool, - webSocketStatus: PropTypes.string + webSocketStatus: PropTypes.string, }; static defaultProps: { @@ -58,7 +58,7 @@ export default class OfflineIndicator extends Component { this.state = { network: null, navBar, - top: new Animated.Value(navBar - HEIGHT) + top: new Animated.Value(navBar - HEIGHT), }; this.backgroundColor = new Animated.Value(0); @@ -109,16 +109,16 @@ export default class OfflineIndicator extends Component { Animated.timing( this.backgroundColor, { toValue: 1, - duration: 100 + duration: 100, } ), Animated.timing( this.state.top, { toValue: (this.state.navBar - HEIGHT), duration: 300, - delay: 500 + delay: 500, } - ) + ), ]).start(() => { this.backgroundColor.setValue(0); this.setState({network: null}); @@ -164,7 +164,7 @@ export default class OfflineIndicator extends Component { Animated.timing( this.state.top, { toValue: this.state.navBar, - duration: 300 + duration: 300, } ).start(); }; @@ -176,7 +176,7 @@ export default class OfflineIndicator extends Component { const background = this.backgroundColor.interpolate({ inputRange: [0, 1], - outputRange: ['#939393', '#629a41'] + outputRange: ['#939393', '#629a41'], }); let i18nId; @@ -247,7 +247,7 @@ const styles = StyleSheet.create({ height: HEIGHT, width: '100%', zIndex: 9, - position: 'absolute' + position: 'absolute', }, wrapper: { alignItems: 'center', @@ -255,24 +255,24 @@ const styles = StyleSheet.create({ height: HEIGHT, flexDirection: 'row', paddingLeft: 12, - paddingRight: 5 + paddingRight: 5, }, message: { color: '#FFFFFF', fontSize: 14, fontWeight: '600', - flex: 1 + flex: 1, }, actionButton: { alignItems: 'center', borderWidth: 1, - borderColor: '#FFFFFF' + borderColor: '#FFFFFF', }, actionContainer: { alignItems: 'flex-end', height: 24, justifyContent: 'center', paddingRight: 10, - width: 60 - } + width: 60, + }, }); diff --git a/app/components/options_context/options_context.android.js b/app/components/options_context/options_context.android.js index 1334e541b..fd56f07e0 100644 --- a/app/components/options_context/options_context.android.js +++ b/app/components/options_context/options_context.android.js @@ -12,12 +12,12 @@ export default class OptionsContext extends PureComponent { cancelText: PropTypes.string, children: PropTypes.node.isRequired, onPress: PropTypes.func.isRequired, - toggleSelected: PropTypes.func.isRequired + toggleSelected: PropTypes.func.isRequired, }; static defaultProps = { actions: [], - cancelText: 'Cancel' + cancelText: 'Cancel', }; show = (additionalAction) => { @@ -32,7 +32,7 @@ export default class OptionsContext extends PureComponent { const actionsText = nextActions.map((a) => a.text); RNBottomSheet.showBottomSheetWithOptions({ options: [...actionsText, cancelText], - cancelButtonIndex: nextActions.length + cancelButtonIndex: nextActions.length, }, (value) => { if (value !== nextActions.length) { const selectedOption = nextActions[value]; diff --git a/app/components/options_context/options_context.ios.js b/app/components/options_context/options_context.ios.js index bf5517b26..b15ba0e34 100644 --- a/app/components/options_context/options_context.ios.js +++ b/app/components/options_context/options_context.ios.js @@ -11,19 +11,19 @@ export default class OptionsContext extends PureComponent { actions: PropTypes.array, children: PropTypes.node.isRequired, onPress: PropTypes.func.isRequired, - toggleSelected: PropTypes.func.isRequired + toggleSelected: PropTypes.func.isRequired, }; static defaultProps = { actions: [], - additionalActions: [] + additionalActions: [], }; constructor(props) { super(props); this.state = { - actions: props.actions + actions: props.actions, }; } @@ -56,7 +56,7 @@ export default class OptionsContext extends PureComponent { hide = () => { this.refs.toolTip.hideMenu(); this.setState({ - actions: this.props.actions + actions: this.props.actions, }); }; @@ -68,7 +68,7 @@ export default class OptionsContext extends PureComponent { } this.setState({ - actions: nextActions + actions: nextActions, }); this.refs.toolTip.showMenu(); diff --git a/app/components/paper_plane.js b/app/components/paper_plane.js index df26cd8c2..741988fef 100644 --- a/app/components/paper_plane.js +++ b/app/components/paper_plane.js @@ -9,7 +9,7 @@ export default class PaperPlane extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/post/index.js b/app/components/post/index.js index d15046d80..5722c1f53 100644 --- a/app/components/post/index.js +++ b/app/components/post/index.js @@ -63,7 +63,7 @@ function mapStateToProps(state, ownProps) { license, roles, theme: getTheme(state), - isFlagged: isPostFlagged(post.id, myPreferences) + isFlagged: isPostFlagged(post.id, myPreferences), }; } @@ -75,8 +75,8 @@ function mapDispatchToProps(dispatch) { deletePost, removePost, setPostTooltipVisible, - insertToDraft - }, dispatch) + insertToDraft, + }, dispatch), }; } diff --git a/app/components/post/post.js b/app/components/post/post.js index 872dfbf46..10cce4d2a 100644 --- a/app/components/post/post.js +++ b/app/components/post/post.js @@ -7,7 +7,7 @@ import { Alert, Clipboard, View, - ViewPropTypes + ViewPropTypes, } from 'react-native'; import {injectIntl, intlShape} from 'react-intl'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; @@ -36,7 +36,7 @@ class Post extends PureComponent { createPost: PropTypes.func.isRequired, deletePost: PropTypes.func.isRequired, insertToDraft: PropTypes.func.isRequired, - removePost: PropTypes.func.isRequired + removePost: PropTypes.func.isRequired, }).isRequired, config: PropTypes.object.isRequired, currentTeamUrl: PropTypes.string.isRequired, @@ -61,11 +61,11 @@ class Post extends PureComponent { theme: PropTypes.object.isRequired, onPress: PropTypes.func, onReply: PropTypes.func, - isFlagged: PropTypes.bool + isFlagged: PropTypes.bool, }; static defaultProps = { - isSearchResult: false + isSearchResult: false, }; constructor(props) { @@ -76,12 +76,12 @@ class Post extends PureComponent { if (post) { this.state = { canEdit: canEditPost(config, license, currentUserId, post, this.editDisableAction), - canDelete: canDeletePost(config, license, currentUserId, post, isAdmin(roles), isSystemAdmin(roles)) + canDelete: canDeletePost(config, license, currentUserId, post, isAdmin(roles), isSystemAdmin(roles)), }; } else { this.state = { canEdit: false, - canDelete: false + canDelete: false, }; } } @@ -96,7 +96,7 @@ class Post extends PureComponent { this.setState({ canEdit: canEditPost(config, license, currentUserId, post, this.editDisableAction), - canDelete: canDeletePost(config, license, currentUserId, post, isAdmin(roles), isSystemAdmin(roles)) + canDelete: canDeletePost(config, license, currentUserId, post, isAdmin(roles), isSystemAdmin(roles)), }); } } @@ -113,14 +113,14 @@ class Post extends PureComponent { animated: true, backButtonTitle: '', passProps: { - userId: post.user_id + userId: post.user_id, }, navigatorStyle: { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }; @@ -143,7 +143,7 @@ class Post extends PureComponent { formatMessage({id: 'mobile.post.delete_question', defaultMessage: 'Are you sure you want to delete this post?'}), [{ text: formatMessage({id: 'mobile.post.cancel', defaultMessage: 'Cancel'}), - style: 'cancel' + style: 'cancel', }, { text: formatMessage({id: 'post_info.del', defaultMessage: 'Delete'}), style: 'destructive', @@ -153,7 +153,7 @@ class Post extends PureComponent { if (post.user_id === currentUserId) { actions.removePost(post); } - } + }, }] ); }; @@ -169,12 +169,12 @@ class Post extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { post, - closeButton: source - } + closeButton: source, + }, }); }); }; @@ -197,13 +197,13 @@ class Post extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { post, closeButton: source, - onEmojiPress: this.handleAddReactionToPost - } + onEmojiPress: this.handleAddReactionToPost, + }, }); }); }); @@ -212,7 +212,7 @@ class Post extends PureComponent { const options = { title: { id: 'mobile.post.failed_title', - defaultMessage: 'Unable to send your message:' + defaultMessage: 'Unable to send your message:', }, items: [{ action: () => { @@ -223,8 +223,8 @@ class Post extends PureComponent { }, text: { id: 'mobile.post.failed_retry', - defaultMessage: 'Try Again' - } + defaultMessage: 'Try Again', + }, }, { action: () => { EventEmitter.emit(NavigationTypes.NAVIGATION_CLOSE_MODAL); @@ -232,12 +232,12 @@ class Post extends PureComponent { }, text: { id: 'mobile.post.failed_delete', - defaultMessage: 'Delete Message' + defaultMessage: 'Delete Message', }, textStyle: { - color: '#CC3239' - } - }] + color: '#CC3239', + }, + }], }; this.props.navigator.showModal({ @@ -246,15 +246,15 @@ class Post extends PureComponent { animationType: 'none', passProps: { items: options.items, - title: options.title + title: options.title, }, navigatorStyle: { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, screenBackgroundColor: 'transparent', - modalPresentationStyle: 'overCurrentContext' - } + modalPresentationStyle: 'overCurrentContext', + }, }); }; @@ -262,7 +262,7 @@ class Post extends PureComponent { const { isSearchResult, onPress, - post + post, } = this.props; if (!getToolTipVisible()) { @@ -298,7 +298,7 @@ class Post extends PureComponent { commentedOnPost, isFirstReply, isLastReply, - theme + theme, } = this.props; if (!this.isReplyPost()) { @@ -361,7 +361,7 @@ class Post extends PureComponent { showFullDate, theme, managedConfig, - isFlagged + isFlagged, } = this.props; if (!post) { @@ -434,48 +434,48 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { backgroundColor: theme.centerChannelBg, - flexDirection: 'row' + flexDirection: 'row', }, pendingPost: { - opacity: 0.5 + opacity: 0.5, }, rightColumn: { flex: 1, flexDirection: 'column', - marginRight: 12 + marginRight: 12, }, rightColumnPadding: { - paddingBottom: 3 + paddingBottom: 3, }, messageContainerWithReplyBar: { flexDirection: 'row', - flex: 1 + flex: 1, }, profilePictureContainer: { marginBottom: 10, marginRight: 10, marginLeft: 12, - marginTop: 10 + marginTop: 10, }, replyBar: { backgroundColor: theme.centerChannelColor, opacity: 0.1, marginRight: 10, width: 3, - flexBasis: 3 + flexBasis: 3, }, replyBarFirst: { - paddingTop: 10 + paddingTop: 10, }, replyBarLast: { - paddingBottom: 10 + paddingBottom: 10, }, selected: { - backgroundColor: changeOpacity(theme.centerChannelColor, 0.1) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), }, highlight: { - backgroundColor: changeOpacity(theme.mentionHighlightBg, 0.5) - } + backgroundColor: changeOpacity(theme.mentionHighlightBg, 0.5), + }, }; }); diff --git a/app/components/post_attachment_opengraph/index.js b/app/components/post_attachment_opengraph/index.js index 821dcb88c..503b7aacb 100644 --- a/app/components/post_attachment_opengraph/index.js +++ b/app/components/post_attachment_opengraph/index.js @@ -11,8 +11,8 @@ import PostAttachmentOpenGraph from './post_attachment_opengraph'; function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - getOpenGraphMetadata - }, dispatch) + getOpenGraphMetadata, + }, dispatch), }; } diff --git a/app/components/post_attachment_opengraph/post_attachment_opengraph.js b/app/components/post_attachment_opengraph/post_attachment_opengraph.js index a7b6a5385..96407c58b 100644 --- a/app/components/post_attachment_opengraph/post_attachment_opengraph.js +++ b/app/components/post_attachment_opengraph/post_attachment_opengraph.js @@ -10,7 +10,7 @@ import { PixelRatio, Text, TouchableOpacity, - View + View, } from 'react-native'; import {getNearestPoint} from 'app/utils/opengraph'; @@ -24,12 +24,12 @@ const THUMBNAIL_SIZE = 75; export default class PostAttachmentOpenGraph extends PureComponent { static propTypes = { actions: PropTypes.shape({ - getOpenGraphMetadata: PropTypes.func.isRequired + getOpenGraphMetadata: PropTypes.func.isRequired, }).isRequired, isReplyPost: PropTypes.bool, link: PropTypes.string.isRequired, openGraphData: PropTypes.object, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; constructor(props) { @@ -37,7 +37,7 @@ export default class PostAttachmentOpenGraph extends PureComponent { this.state = { imageLoaded: false, - hasLargeImage: false + hasLargeImage: false, }; } @@ -120,7 +120,7 @@ export default class PostAttachmentOpenGraph extends PureComponent { const bestDimensions = { width: Dimensions.get('window').width - 88, - height: MAX_IMAGE_HEIGHT + height: MAX_IMAGE_HEIGHT, }; const bestImage = getNearestPoint(bestDimensions, data.images, 'width', 'height'); const imageUrl = bestImage.secure_url || bestImage.url; @@ -149,7 +149,7 @@ export default class PostAttachmentOpenGraph extends PureComponent { ...dimensions, hasLargeImage: isLarge, imageLoaded: true, - imageUrl + imageUrl, }); } }, () => null); @@ -233,37 +233,37 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderColor: changeOpacity(theme.centerChannelColor, 0.2), borderWidth: 1, marginTop: 10, - padding: 10 + padding: 10, }, flex: { - flex: 1 + flex: 1, }, wrapper: { flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, siteTitle: { fontSize: 12, color: changeOpacity(theme.centerChannelColor, 0.5), - marginBottom: 10 + marginBottom: 10, }, siteSubtitle: { fontSize: 14, color: theme.linkColor, - marginBottom: 10 + marginBottom: 10, }, siteDescription: { fontSize: 13, color: changeOpacity(theme.centerChannelColor, 0.7), - marginBottom: 10 + marginBottom: 10, }, image: { - borderRadius: 3 + borderRadius: 3, }, thumbnail: { flex: 1, alignItems: 'flex-end', - justifyContent: 'flex-start' - } + justifyContent: 'flex-start', + }, }; }); diff --git a/app/components/post_body/index.js b/app/components/post_body/index.js index 21fb8a3fb..e051b453a 100644 --- a/app/components/post_body/index.js +++ b/app/components/post_body/index.js @@ -37,7 +37,7 @@ function mapStateToProps(state, ownProps) { isPostEphemeral: isPostEphemeral(post), isSystemMessage: isSystemMessage(post), message: post.message, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -45,8 +45,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ flagPost, - unflagPost - }, dispatch) + unflagPost, + }, dispatch), }; } diff --git a/app/components/post_body/post_body.js b/app/components/post_body/post_body.js index 1a9d90217..646098a37 100644 --- a/app/components/post_body/post_body.js +++ b/app/components/post_body/post_body.js @@ -7,7 +7,7 @@ import { Platform, TouchableHighlight, TouchableOpacity, - View + View, } from 'react-native'; import {injectIntl, intlShape} from 'react-intl'; import Icon from 'react-native-vector-icons/Ionicons'; @@ -28,7 +28,7 @@ class PostBody extends PureComponent { static propTypes = { actions: PropTypes.shape({ flagPost: PropTypes.func.isRequired, - unflagPost: PropTypes.func.isRequired + unflagPost: PropTypes.func.isRequired, }).isRequired, canDelete: PropTypes.bool, canEdit: PropTypes.bool, @@ -58,7 +58,7 @@ class PostBody extends PureComponent { postProps: PropTypes.object, renderReplyBar: PropTypes.func, theme: PropTypes.object, - toggleSelected: PropTypes.func + toggleSelected: PropTypes.func, }; static defaultProps = { @@ -71,7 +71,7 @@ class PostBody extends PureComponent { onPostEdit: emptyFunction, onPress: emptyFunction, renderReplyBar: emptyFunction, - toggleSelected: emptyFunction + toggleSelected: emptyFunction, }; handleHideUnderlay = () => { @@ -111,7 +111,7 @@ class PostBody extends PureComponent { navigator, onPress, postId, - toggleSelected + toggleSelected, } = this.props; let attachments; @@ -158,7 +158,7 @@ class PostBody extends PureComponent { postProps, renderReplyBar, theme, - toggleSelected + toggleSelected, } = this.props; const {formatMessage} = intl; const actions = []; @@ -172,26 +172,26 @@ class PostBody extends PureComponent { if (!isPendingOrFailedPost && !isSearchResult && !isSystemMessage && !isPostEphemeral) { actions.push({ text: formatMessage({id: 'mobile.post_info.add_reaction', defaultMessage: 'Add Reaction'}), - onPress: this.props.onAddReaction + onPress: this.props.onAddReaction, }); if (managedConfig.copyAndPasteProtection !== 'true') { actions.push({ text: formatMessage({id: 'mobile.post_info.copy_post', defaultMessage: 'Copy Post'}), onPress: this.props.onCopyText, - copyPost: true + copyPost: true, }); } if (isFlagged) { actions.push({ text: formatMessage({id: 'post_info.mobile.unflag', defaultMessage: 'Unflag'}), - onPress: this.unflagPost + onPress: this.unflagPost, }); } else { actions.push({ text: formatMessage({id: 'post_info.mobile.flag', defaultMessage: 'Flag'}), - onPress: this.flagPost + onPress: this.flagPost, }); } @@ -205,7 +205,7 @@ class PostBody extends PureComponent { actions.push({ text: formatMessage({id: 'get_post_link_modal.title', defaultMessage: 'Copy Permalink'}), - onPress: this.props.onCopyPermalink + onPress: this.props.onCopyPermalink, }); } @@ -337,18 +337,18 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { message: { color: theme.centerChannelColor, fontSize: normalizeFontSizeByDevice(13), - lineHeight: normalizeFontSizeByDevice(16) + lineHeight: normalizeFontSizeByDevice(16), }, messageContainerWithReplyBar: { flexDirection: 'row', - flex: 1 + flex: 1, }, pendingPost: { - opacity: 0.5 + opacity: 0.5, }, systemMessage: { - opacity: 0.6 - } + opacity: 0.6, + }, }; }); diff --git a/app/components/post_body_additional_content/index.js b/app/components/post_body_additional_content/index.js index ab4db7c34..554645159 100644 --- a/app/components/post_body_additional_content/index.js +++ b/app/components/post_body_additional_content/index.js @@ -49,7 +49,7 @@ function makeMapStateToProps() { link, openGraphData: getOpenGraphMetadataForUrl(state, link), showLinkPreviews: previewsEnabled && config.EnableLinkPreviews === 'true', - theme: getTheme(state) + theme: getTheme(state), }; }; } diff --git a/app/components/post_body_additional_content/post_body_additional_content.js b/app/components/post_body_additional_content/post_body_additional_content.js index 7dd950e2f..cf6ce711a 100644 --- a/app/components/post_body_additional_content/post_body_additional_content.js +++ b/app/components/post_body_additional_content/post_body_additional_content.js @@ -10,7 +10,7 @@ import { Platform, StyleSheet, TouchableWithoutFeedback, - View + View, } from 'react-native'; import {YouTubeStandaloneAndroid, YouTubeStandaloneIOS} from 'react-native-youtube'; import youTubeVideoId from 'youtube-video-id'; @@ -42,11 +42,11 @@ export default class PostBodyAdditionalContent extends PureComponent { postProps: PropTypes.object.isRequired, showLinkPreviews: PropTypes.bool.isRequired, textStyles: PropTypes.object, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - onLongPress: emptyFunction + onLongPress: emptyFunction, }; constructor(props) { @@ -54,7 +54,7 @@ export default class PostBodyAdditionalContent extends PureComponent { this.state = { linkLoadError: false, - linkLoaded: false + linkLoaded: false, }; this.mounted = false; @@ -73,7 +73,7 @@ export default class PostBodyAdditionalContent extends PureComponent { if (nextProps.message !== this.props.message) { this.setState({ linkLoadError: false, - linkLoaded: false + linkLoaded: false, }, () => { this.getImageSize(); }); @@ -161,7 +161,7 @@ export default class PostBodyAdditionalContent extends PureComponent { blockStyles, navigator, textStyles, - theme + theme, } = this.props; const {attachments} = postProps; @@ -245,7 +245,7 @@ export default class PostBodyAdditionalContent extends PureComponent { YouTubeStandaloneAndroid.playVideo({ apiKey: config.GoogleDeveloperKey, videoId, - autoplay: true + autoplay: true, }); } else { Linking.openURL(link); @@ -287,12 +287,12 @@ const styles = StyleSheet.create({ flex: 1, justifyContent: 'flex-start', marginBottom: 6, - marginTop: 10 + marginTop: 10, }, image: { alignItems: 'center', borderRadius: 3, justifyContent: 'center', - marginVertical: 1 - } + marginVertical: 1, + }, }); diff --git a/app/components/post_header/index.js b/app/components/post_header/index.js index e563df4e4..43db52d8a 100644 --- a/app/components/post_header/index.js +++ b/app/components/post_header/index.js @@ -34,7 +34,7 @@ function makeMapStateToProps() { isSystemMessage: isSystemMessage(post), overrideUsername: post.props && post.props.override_username, theme: getTheme(state), - username: user.username + username: user.username, }; }; } diff --git a/app/components/post_header/post_header.js b/app/components/post_header/post_header.js index b17ad439f..5e9fa059f 100644 --- a/app/components/post_header/post_header.js +++ b/app/components/post_header/post_header.js @@ -7,7 +7,7 @@ import { Platform, Text, TouchableOpacity, - View + View, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -40,13 +40,13 @@ export default class PostHeader extends PureComponent { showFullDate: PropTypes.bool, theme: PropTypes.object.isRequired, username: PropTypes.string.isRequired, - isFlagged: PropTypes.bool + isFlagged: PropTypes.bool, }; static defaultProps = { commentCount: 0, onPress: emptyFunction, - onUsernamePress: emptyFunction + onUsernamePress: emptyFunction, }; handleUsernamePress = () => { @@ -58,7 +58,7 @@ export default class PostHeader extends PureComponent { enablePostUsernameOverride, fromWebHook, isSystemMessage, - overrideUsername + overrideUsername, } = this.props; if (fromWebHook) { @@ -136,7 +136,7 @@ export default class PostHeader extends PureComponent { defaultMessage='Commented on {name}{apostrophe} message: ' values={{ name, - apostrophe + apostrophe, }} style={style.commentedOn} /> @@ -156,7 +156,7 @@ export default class PostHeader extends PureComponent { shouldRenderReplyButton, showFullDate, theme, - isFlagged + isFlagged, } = this.props; const style = getStyleSheet(theme); const showReply = shouldRenderReplyButton || (!commentedOnDisplayName && commentCount > 0 && renderReplies); @@ -236,29 +236,29 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { commentedOn: { color: changeOpacity(theme.centerChannelColor, 0.65), marginBottom: 3, - lineHeight: 21 + lineHeight: 21, }, postInfoContainer: { alignItems: 'center', flexDirection: 'row', - marginTop: 10 + marginTop: 10, }, pendingPost: { - opacity: 0.5 + opacity: 0.5, }, timeContainer: { - justifyContent: 'center' + justifyContent: 'center', }, datetime: { flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, time: { color: theme.centerChannelColor, fontSize: 13, marginLeft: 5, marginBottom: 1, - opacity: 0.5 + opacity: 0.5, }, replyIconContainer: { flexDirection: 'row', @@ -266,15 +266,15 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { justifyContent: 'center', height: 30, minWidth: 40, - paddingVertical: 10 + paddingVertical: 10, }, replyText: { fontSize: 15, marginLeft: 3, - color: theme.linkColor + color: theme.linkColor, }, botContainer: { - flexDirection: 'row' + flexDirection: 'row', }, bot: { alignSelf: 'center', @@ -285,26 +285,26 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { fontWeight: '600', marginRight: 5, paddingVertical: 2, - paddingHorizontal: 4 + paddingHorizontal: 4, }, displayName: { color: theme.centerChannelColor, fontSize: 15, fontWeight: '600', marginRight: 5, - marginBottom: 3 + marginBottom: 3, }, flagContainer: { marginLeft: 10, alignSelf: 'center', ...Platform.select({ ios: { - marginBottom: 2 + marginBottom: 2, }, android: { - marginBottom: 1 - } - }) - } + marginBottom: 1, + }, + }), + }, }; }); diff --git a/app/components/post_list/date_header/date_header.js b/app/components/post_list/date_header/date_header.js index c95a3665e..4d7aafafe 100644 --- a/app/components/post_list/date_header/date_header.js +++ b/app/components/post_list/date_header/date_header.js @@ -5,7 +5,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { View, - ViewPropTypes + ViewPropTypes, } from 'react-native'; import FormattedDate from 'app/components/formatted_date'; @@ -15,7 +15,7 @@ export default class DateHeader extends PureComponent { static propTypes = { date: PropTypes.object.isRequired, theme: PropTypes.object.isRequired, - style: ViewPropTypes.style + style: ViewPropTypes.style, }; render() { @@ -46,21 +46,21 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { container: { alignItems: 'center', flexDirection: 'row', - height: 28 + height: 28, }, dateContainer: { - marginHorizontal: 15 + marginHorizontal: 15, }, line: { flex: 1, height: 1, backgroundColor: theme.centerChannelColor, - opacity: 0.2 + opacity: 0.2, }, date: { color: theme.centerChannelColor, fontSize: 14, - fontWeight: '600' - } + fontWeight: '600', + }, }; }); diff --git a/app/components/post_list/date_header/index.js b/app/components/post_list/date_header/index.js index 33d81bc30..7a48ae953 100644 --- a/app/components/post_list/date_header/index.js +++ b/app/components/post_list/date_header/index.js @@ -9,7 +9,7 @@ import DateHeader from './date_header'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/post_list/index.js b/app/components/post_list/index.js index 59cb7cc65..28192a9fd 100644 --- a/app/components/post_list/index.js +++ b/app/components/post_list/index.js @@ -23,7 +23,7 @@ function makeMapStateToProps() { deviceHeight, measureCellLayout, postIds, - theme: getTheme(state) + theme: getTheme(state), }; }; } @@ -31,8 +31,8 @@ function makeMapStateToProps() { function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - refreshChannelWithRetry - }, dispatch) + refreshChannelWithRetry, + }, dispatch), }; } diff --git a/app/components/post_list/load_more_posts/index.js b/app/components/post_list/load_more_posts/index.js index 5d0c37dd6..21444564f 100644 --- a/app/components/post_list/load_more_posts/index.js +++ b/app/components/post_list/load_more_posts/index.js @@ -7,7 +7,7 @@ import LoadMorePosts from './load_more_posts'; function mapStateToProps(state, ownProps) { return { - loading: Boolean(state.views.channel.loadingPosts[ownProps.channelId]) + loading: Boolean(state.views.channel.loadingPosts[ownProps.channelId]), }; } diff --git a/app/components/post_list/load_more_posts/load_more_posts.js b/app/components/post_list/load_more_posts/load_more_posts.js index e5f3038bc..fbf594e3b 100644 --- a/app/components/post_list/load_more_posts/load_more_posts.js +++ b/app/components/post_list/load_more_posts/load_more_posts.js @@ -7,7 +7,7 @@ import { ActivityIndicator, TouchableOpacity, View, - ViewPropTypes + ViewPropTypes, } from 'react-native'; import {makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -20,7 +20,7 @@ export default class LoadMorePosts extends PureComponent { loading: PropTypes.bool.isRequired, loadMore: PropTypes.func, theme: PropTypes.object.isRequired, - style: ViewPropTypes.style + style: ViewPropTypes.style, }; loadMore = () => { @@ -70,12 +70,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { alignItems: 'center', justifyContent: 'center', height: 28, - marginVertical: 10 + marginVertical: 10, }, text: { fontSize: 14, fontWeight: '600', - color: theme.linkColor - } + color: theme.linkColor, + }, }; }); diff --git a/app/components/post_list/new_messages_divider.js b/app/components/post_list/new_messages_divider.js index 204a25869..1cb7ce3cb 100644 --- a/app/components/post_list/new_messages_divider.js +++ b/app/components/post_list/new_messages_divider.js @@ -5,7 +5,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { View, - ViewPropTypes + ViewPropTypes, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -46,7 +46,7 @@ function NewMessagesDivider(props) { NewMessagesDivider.propTypes = { moreMessages: PropTypes.bool, style: ViewPropTypes.style, - theme: PropTypes.object + theme: PropTypes.object, }; const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { @@ -54,20 +54,20 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { container: { alignItems: 'center', flexDirection: 'row', - height: 28 + height: 28, }, textContainer: { - marginHorizontal: 15 + marginHorizontal: 15, }, line: { flex: 1, height: 1, - backgroundColor: theme.newMessageSeparator + backgroundColor: theme.newMessageSeparator, }, text: { fontSize: 14, - color: theme.newMessageSeparator - } + color: theme.newMessageSeparator, + }, }; }); diff --git a/app/components/post_list/post_list.js b/app/components/post_list/post_list.js index 391f3195a..7e863d40f 100644 --- a/app/components/post_list/post_list.js +++ b/app/components/post_list/post_list.js @@ -7,7 +7,7 @@ import { InteractionManager, Platform, StyleSheet, - FlatList + FlatList, } from 'react-native'; import ChannelIntro from 'app/components/channel_intro'; @@ -32,7 +32,7 @@ const DATE_HEADER_HEIGHT = 28; export default class PostList extends PureComponent { static propTypes = { actions: PropTypes.shape({ - refreshChannelWithRetry: PropTypes.func.isRequired + refreshChannelWithRetry: PropTypes.func.isRequired, }).isRequired, channelId: PropTypes.string, currentUserId: PropTypes.string, @@ -50,11 +50,11 @@ export default class PostList extends PureComponent { renderReplies: PropTypes.bool, showLoadMore: PropTypes.bool, shouldRenderReplyButton: PropTypes.bool, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - loadMore: () => true + loadMore: () => true, }; newMessagesIndex = -1; @@ -64,7 +64,7 @@ export default class PostList extends PureComponent { state = { managedConfig: {}, - scrollToMessage: false + scrollToMessage: false, }; componentWillMount() { @@ -129,7 +129,7 @@ export default class PostList extends PureComponent { this.newMessagesIndex = -1; this.moreNewMessages = false; this.setState({ - scrollToMessage: false + scrollToMessage: false, }); } }); @@ -143,7 +143,7 @@ export default class PostList extends PureComponent { } this.setState({ - managedConfig: nextConfig + managedConfig: nextConfig, }); }; @@ -156,7 +156,7 @@ export default class PostList extends PureComponent { const { actions, channelId, - onRefresh + onRefresh, } = this.props; if (channelId) { @@ -173,7 +173,7 @@ export default class PostList extends PureComponent { if (this.props.postIds.length === Object.values(this.itemMeasurements).length) { if (this.newMessagesIndex !== -1 && !this.newMessageScrolledTo) { this.setState({ - scrollToMessage: true + scrollToMessage: true, }); } } @@ -227,7 +227,7 @@ export default class PostList extends PureComponent { navigator, onPostPress, renderReplies, - shouldRenderReplyButton + shouldRenderReplyButton, } = this.props; const {managedConfig} = this.state; @@ -280,7 +280,7 @@ export default class PostList extends PureComponent { onLayout = (event) => { const {height} = event.nativeEvent.layout; this.setState({ - postListHeight: height + postListHeight: height, }); } @@ -290,11 +290,11 @@ export default class PostList extends PureComponent { highlightPostId, loadMore, postIds, - showLoadMore + showLoadMore, } = this.props; const refreshControl = { - refreshing: false + refreshing: false, }; if (channelId) { @@ -324,6 +324,6 @@ export default class PostList extends PureComponent { const styles = StyleSheet.create({ postListContent: { - paddingTop: 5 - } + paddingTop: 5, + }, }); diff --git a/app/components/post_list/with_layout.js b/app/components/post_list/with_layout.js index 149765bf1..570856a45 100644 --- a/app/components/post_list/with_layout.js +++ b/app/components/post_list/with_layout.js @@ -12,11 +12,11 @@ function withLayout(WrappedComponent) { static propTypes = { index: PropTypes.number.isRequired, onLayoutCalled: PropTypes.func, - shouldCallOnLayout: PropTypes.bool + shouldCallOnLayout: PropTypes.bool, }; static defaultProps = { - onLayoutCalled: emptyFunction + onLayoutCalled: emptyFunction, } onLayout = (event) => { diff --git a/app/components/post_list_retry.js b/app/components/post_list_retry.js index f7ddf25d7..ed6297234 100644 --- a/app/components/post_list_retry.js +++ b/app/components/post_list_retry.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Platform, TouchableOpacity, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; @@ -16,7 +16,7 @@ import {makeStyleSheetFromTheme} from 'app/utils/theme'; export default class PostListRetry extends PureComponent { static propTypes = { retry: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { @@ -51,7 +51,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { buttonContainer: { alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, buttonWrapper: { height: 60, @@ -60,24 +60,24 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { backgroundColor: '#ddd', alignItems: 'center', justifyContent: 'center', - overflow: 'hidden' + overflow: 'hidden', }, container: { flex: 1, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, icon: { color: theme.linkColor, ...Platform.select({ ios: { - marginTop: 5 - } - }) + marginTop: 5, + }, + }), }, text: { marginTop: 15, - color: theme.linkColor - } + color: theme.linkColor, + }, }; }); diff --git a/app/components/post_profile_picture/index.js b/app/components/post_profile_picture/index.js index 43b983c45..bf78f3cef 100644 --- a/app/components/post_profile_picture/index.js +++ b/app/components/post_profile_picture/index.js @@ -20,7 +20,7 @@ function mapStateToProps(state, ownProps) { isSystemMessage: isSystemMessage(post), overrideIconUrl: post.props && post.props.override_icon_url, userId: post.user_id, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/post_profile_picture/post_profile_picture.js b/app/components/post_profile_picture/post_profile_picture.js index e2fb4bfa5..7be267071 100644 --- a/app/components/post_profile_picture/post_profile_picture.js +++ b/app/components/post_profile_picture/post_profile_picture.js @@ -20,11 +20,11 @@ export default class PostProfilePicture extends PureComponent { overrideIconUrl: PropTypes.string, onViewUserProfile: PropTypes.func, theme: PropTypes.object, - userId: PropTypes.string + userId: PropTypes.string, }; static defaultProps = { - onViewUserProfile: emptyFunction + onViewUserProfile: emptyFunction, }; render() { @@ -35,7 +35,7 @@ export default class PostProfilePicture extends PureComponent { onViewUserProfile, overrideIconUrl, theme, - userId + userId, } = this.props; if (isSystemMessage) { @@ -60,7 +60,7 @@ export default class PostProfilePicture extends PureComponent { style={{ height: PROFILE_PICTURE_SIZE, width: PROFILE_PICTURE_SIZE, - borderRadius: PROFILE_PICTURE_SIZE / 2 + borderRadius: PROFILE_PICTURE_SIZE / 2, }} /> diff --git a/app/components/post_textbox/components/paper_clip_icon.js b/app/components/post_textbox/components/paper_clip_icon.js index aa988e383..4f299f641 100644 --- a/app/components/post_textbox/components/paper_clip_icon.js +++ b/app/components/post_textbox/components/paper_clip_icon.js @@ -9,7 +9,7 @@ export default class PaperClipIcon extends Component { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; setNativeProps = (nativeProps) => { diff --git a/app/components/post_textbox/components/typing/index.js b/app/components/post_textbox/components/typing/index.js index 4c51c8aef..44f1677a9 100644 --- a/app/components/post_textbox/components/typing/index.js +++ b/app/components/post_textbox/components/typing/index.js @@ -12,7 +12,7 @@ import Typing from './typing'; function mapStateToProps(state) { return { theme: getTheme(state), - typing: getUsersTyping(state) + typing: getUsersTyping(state), }; } diff --git a/app/components/post_textbox/components/typing/typing.js b/app/components/post_textbox/components/typing/typing.js index 0586b34fa..1f4820e4e 100644 --- a/app/components/post_textbox/components/typing/typing.js +++ b/app/components/post_textbox/components/typing/typing.js @@ -2,7 +2,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { Animated, - Text + Text, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -13,11 +13,11 @@ const {View: AnimatedView} = Animated; export default class Typing extends PureComponent { static propTypes = { theme: PropTypes.object.isRequired, - typing: PropTypes.array.isRequired + typing: PropTypes.array.isRequired, }; state = { - typingHeight: new Animated.Value(0) + typingHeight: new Animated.Value(0), } componentWillReceiveProps(nextProps) { @@ -33,7 +33,7 @@ export default class Typing extends PureComponent { Animated.timing(this.state.typingHeight, { toValue: height, - duration: 200 + duration: 200, }).start(); } @@ -51,7 +51,7 @@ export default class Typing extends PureComponent { id='msg_typing.isTyping' defaultMessage='{user} is typing...' values={{ - user: nextTyping[0] + user: nextTyping[0], }} /> ); @@ -63,7 +63,7 @@ export default class Typing extends PureComponent { defaultMessage='{users} and {last} are typing...' values={{ users: (nextTyping.join(', ')), - last + last, }} /> ); @@ -96,7 +96,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { fontSize: 11, marginBottom: 5, color: theme.centerChannelColor, - backgroundColor: 'transparent' - } + backgroundColor: 'transparent', + }, }; }); diff --git a/app/components/post_textbox/index.js b/app/components/post_textbox/index.js index 02a0fe526..a4454efd9 100644 --- a/app/components/post_textbox/index.js +++ b/app/components/post_textbox/index.js @@ -44,7 +44,7 @@ function mapStateToProps(state, ownProps) { files: currentDraft.files, theme: getTheme(state), uploadFileRequestStatus: state.requests.files.uploadFiles.status, - value: currentDraft.draft + value: currentDraft.draft, }; } @@ -62,8 +62,8 @@ function mapDispatchToProps(dispatch) { handleUploadFiles, userTyping, handlePostDraftSelectionChanged, - handleCommentDraftSelectionChanged - }, dispatch) + handleCommentDraftSelectionChanged, + }, dispatch), }; } diff --git a/app/components/post_textbox/post_textbox.js b/app/components/post_textbox/post_textbox.js index 4a80518d9..e4243fdac 100644 --- a/app/components/post_textbox/post_textbox.js +++ b/app/components/post_textbox/post_textbox.js @@ -35,7 +35,7 @@ export default class PostTextbox extends PureComponent { handleUploadFiles: PropTypes.func.isRequired, userTyping: PropTypes.func.isRequired, handlePostDraftSelectionChanged: PropTypes.func.isRequired, - handleCommentDraftSelectionChanged: PropTypes.func.isRequired + handleCommentDraftSelectionChanged: PropTypes.func.isRequired, }).isRequired, canUploadFiles: PropTypes.bool.isRequired, channelId: PropTypes.string.isRequired, @@ -47,17 +47,17 @@ export default class PostTextbox extends PureComponent { rootId: PropTypes.string, theme: PropTypes.object.isRequired, uploadFileRequestStatus: PropTypes.string.isRequired, - value: PropTypes.string.isRequired + value: PropTypes.string.isRequired, }; static defaultProps = { files: [], rootId: '', - value: '' + value: '', }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props) { @@ -67,7 +67,7 @@ export default class PostTextbox extends PureComponent { contentHeight: INITIAL_HEIGHT, keyboardType: 'default', value: props.value, - showFileMaxWarning: false + showFileMaxWarning: false, }; } @@ -125,7 +125,7 @@ export default class PostTextbox extends PureComponent { const { actions, channelId, - rootId + rootId, } = this.props; if (rootId) { @@ -143,14 +143,14 @@ export default class PostTextbox extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.message_length.title', - defaultMessage: 'Message Length' + defaultMessage: 'Message Length', }), intl.formatMessage({ id: 'mobile.message_length.message', - defaultMessage: 'Your current message is too long. Current character count: {max}/{count}' + defaultMessage: 'Your current message is too long. Current character count: {max}/{count}', }, { max: MAX_MESSAGE_LENGTH, - count: valueLength + count: valueLength, }) ); } @@ -178,7 +178,7 @@ export default class PostTextbox extends PureComponent { } this.setState({ - contentHeight + contentHeight, }); }; @@ -221,21 +221,21 @@ export default class PostTextbox extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.post_textbox.uploadFailedTitle', - defaultMessage: 'Attachment failure' + defaultMessage: 'Attachment failure', }), intl.formatMessage({ id: 'mobile.post_textbox.uploadFailedDesc', - defaultMessage: 'Some attachments failed to upload to the server, Are you sure you want to post the message?' + defaultMessage: 'Some attachments failed to upload to the server, Are you sure you want to post the message?', }), [{ - text: intl.formatMessage({id: 'mobile.channel_info.alertNo', defaultMessage: 'No'}) + text: intl.formatMessage({id: 'mobile.channel_info.alertNo', defaultMessage: 'No'}), }, { text: intl.formatMessage({id: 'mobile.channel_info.alertYes', defaultMessage: 'Yes'}), onPress: () => { // Remove only failed files actions.handleClearFailedFiles(channelId, rootId); this.sendMessage(); - } + }, }], ); } else { @@ -247,7 +247,7 @@ export default class PostTextbox extends PureComponent { const { actions, channelId, - rootId + rootId, } = this.props; this.checkMessageLength(value); @@ -309,14 +309,14 @@ export default class PostTextbox extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.post_textbox.empty.title', - defaultMessage: 'Empty Message' + defaultMessage: 'Empty Message', }), intl.formatMessage({ id: 'mobile.post_textbox.empty.message', - defaultMessage: 'You are trying to send an empty message.\nPlease make sure you have a message or at least one attached file.' + defaultMessage: 'You are trying to send an empty message.\nPlease make sure you have a message or at least one attached file.', }), [{ - text: intl.formatMessage({id: 'mobile.post_textbox.empty.ok', defaultMessage: 'OK'}) + text: intl.formatMessage({id: 'mobile.post_textbox.empty.ok', defaultMessage: 'OK'}), }], ); } else { @@ -329,7 +329,7 @@ export default class PostTextbox extends PureComponent { channel_id: channelId, root_id: rootId, parent_id: rootId, - message: value + message: value, }; actions.createPost(post, postFiles); @@ -344,7 +344,7 @@ export default class PostTextbox extends PureComponent { // Shrink the input textbox since the layout events lag slightly const nextState = { - contentHeight: INITIAL_HEIGHT + contentHeight: INITIAL_HEIGHT, }; // Fixes the issue where Android predictive text would prepend suggestions to the post draft when messages @@ -368,7 +368,7 @@ export default class PostTextbox extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.commands.error_title', - defaultMessage: 'Error Executing Command' + defaultMessage: 'Error Executing Command', }), error.message ); @@ -400,7 +400,7 @@ export default class PostTextbox extends PureComponent { files, navigator, rootId, - theme + theme, } = this.props; const style = getStyleSheet(theme); @@ -409,7 +409,7 @@ export default class PostTextbox extends PureComponent { {intl.formatMessage({ id: 'create_post.deactivated', - defaultMessage: 'You are viewing an archived channel with a deactivated user.' + defaultMessage: 'You are viewing an archived channel with a deactivated user.', })} ); @@ -492,7 +492,7 @@ export default class PostTextbox extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { disableButton: { - backgroundColor: changeOpacity(theme.buttonBg, 0.3) + backgroundColor: changeOpacity(theme.buttonBg, 0.3), }, input: { color: '#000', @@ -502,7 +502,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { paddingLeft: 12, paddingRight: 12, paddingTop: 8, - textAlignVertical: 'top' + textAlignVertical: 'top', }, hidden: { position: 'absolute', @@ -510,17 +510,17 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { left: 10000, // way off screen backgroundColor: 'transparent', borderColor: 'transparent', - color: 'transparent' + color: 'transparent', }, inputContainer: { flex: 1, flexDirection: 'row', backgroundColor: '#fff', alignItems: 'stretch', - marginRight: 10 + marginRight: 10, }, inputContainerWithoutFileUpload: { - marginLeft: 10 + marginLeft: 10, }, inputWrapper: { alignItems: 'flex-end', @@ -528,7 +528,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { paddingVertical: 4, backgroundColor: theme.centerChannelBg, borderTopWidth: 1, - borderTopColor: changeOpacity(theme.centerChannelColor, 0.20) + borderTopColor: changeOpacity(theme.centerChannelColor, 0.20), }, deactivatedMessage: { color: changeOpacity(theme.centerChannelColor, 0.8), @@ -541,12 +541,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderTopWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.20), marginLeft: 10, - marginRight: 10 + marginRight: 10, }, sendButtonContainer: { justifyContent: 'flex-end', paddingHorizontal: 5, - paddingVertical: 3 + paddingVertical: 3, }, sendButton: { backgroundColor: theme.buttonBg, @@ -554,7 +554,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 28, width: 28, alignItems: 'center', - justifyContent: 'center' - } + justifyContent: 'center', + }, }; }); diff --git a/app/components/profile_picture/index.js b/app/components/profile_picture/index.js index f9911663a..ba443ff54 100644 --- a/app/components/profile_picture/index.js +++ b/app/components/profile_picture/index.js @@ -20,15 +20,15 @@ function mapStateToProps(state, ownProps) { return { theme: getTheme(state), status, - user + user, }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - getStatusForId: getStatusesByIdsBatchedDebounced - }, dispatch) + getStatusForId: getStatusesByIdsBatchedDebounced, + }, dispatch), }; } diff --git a/app/components/profile_picture/profile_picture.js b/app/components/profile_picture/profile_picture.js index 9a1b5c132..c7089f8e3 100644 --- a/app/components/profile_picture/profile_picture.js +++ b/app/components/profile_picture/profile_picture.js @@ -15,7 +15,7 @@ import {Client4} from 'mattermost-redux/client'; const STATUS_BUFFER = Platform.select({ ios: 3, - android: 2 + android: 2, }); export default class ProfilePicture extends PureComponent { @@ -30,8 +30,8 @@ export default class ProfilePicture extends PureComponent { imageUri: PropTypes.string, theme: PropTypes.object.isRequired, actions: PropTypes.shape({ - getStatusForId: PropTypes.func.isRequired - }) + getStatusForId: PropTypes.func.isRequired, + }), }; static defaultProps = { @@ -39,7 +39,7 @@ export default class ProfilePicture extends PureComponent { size: 128, statusBorderWidth: 2, statusSize: 14, - edit: false + edit: false, }; componentDidMount() { @@ -68,7 +68,7 @@ export default class ProfilePicture extends PureComponent { statusStyle = { width: this.props.statusSize, height: this.props.statusSize, - backgroundColor: 'white' + backgroundColor: 'white', }; statusIcon = ( { overflow: 'hidden', alignItems: 'center', justifyContent: 'center', - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, status: { - color: theme.centerChannelBg - } + color: theme.centerChannelBg, + }, }; }); diff --git a/app/components/radio_button/index.js b/app/components/radio_button/index.js index 1723fb7f7..06a5085b9 100644 --- a/app/components/radio_button/index.js +++ b/app/components/radio_button/index.js @@ -6,7 +6,7 @@ import RadioButtonGroup from './radio_button_group'; export { RadioButton, - RadioButtonGroup + RadioButtonGroup, }; export default RadioButtonGroup; diff --git a/app/components/radio_button/radio_button.js b/app/components/radio_button/radio_button.js index aeaf61ee5..8f21993ac 100644 --- a/app/components/radio_button/radio_button.js +++ b/app/components/radio_button/radio_button.js @@ -20,21 +20,21 @@ class RadioButton extends PureComponent { value: PropTypes.string, checked: PropTypes.bool, disabled: PropTypes.bool, - onCheck: PropTypes.func + onCheck: PropTypes.func, }; constructor(props) { super(props); this.state = { scaleValue: new Animated.Value(0), - opacityValue: new Animated.Value(0) + opacityValue: new Animated.Value(0), }; this.responder = { onStartShouldSetResponder: () => true, onResponderGrant: this.highlight, onResponderRelease: this.handleResponderEnd, - onResponderTerminate: this.unHighlight + onResponderTerminate: this.unHighlight, }; } @@ -43,14 +43,14 @@ class RadioButton extends PureComponent { this.state.scaleValue, { toValue: 1, - duration: 150 + duration: 150, } ).start(); Animated.timing( this.state.opacityValue, { toValue: 0.1, - duration: 100 + duration: 100, } ).start(); }; @@ -60,13 +60,13 @@ class RadioButton extends PureComponent { this.state.scaleValue, { toValue: 0.001, - duration: 1500 + duration: 1500, } ).start(); Animated.timing( this.state.opacityValue, { - toValue: 0 + toValue: 0, } ).start(); }; @@ -99,11 +99,11 @@ class RadioButton extends PureComponent { styles.ripple, { transform: [ - {scale: scaleValue} + {scale: scaleValue}, ], opacity: opacityValue, - backgroundColor: color - } + backgroundColor: color, + }, ]} /> {this.props.label} @@ -135,19 +135,19 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flexDirection: 'row', alignItems: 'center', backgroundColor: theme.centerChannelBg, - marginBottom: 15 + marginBottom: 15, }, ripple: { position: 'absolute', width: 48, height: 48, borderRadius: 56, - top: 6 + top: 6, }, labelContainer: { flex: 1, flexDirection: 'row', - justifyContent: 'center' + justifyContent: 'center', }, label: { color: theme.centerChannelColor, @@ -155,15 +155,15 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { fontSize: 17, marginLeft: 15, textAlignVertical: 'center', - includeFontPadding: false - } + includeFontPadding: false, + }, }; }); function mapStateToProps(state, ownProps) { return { ...ownProps, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/radio_button/radio_button_group.js b/app/components/radio_button/radio_button_group.js index 9fa37ef6d..532458f85 100644 --- a/app/components/radio_button/radio_button_group.js +++ b/app/components/radio_button/radio_button_group.js @@ -10,7 +10,7 @@ export default class RadioButtonGroup extends PureComponent { static propTypes = { options: PropTypes.array, name: PropTypes.string.isRequired, - onSelect: PropTypes.func + onSelect: PropTypes.func, }; static defaultProps: { @@ -27,7 +27,7 @@ export default class RadioButtonGroup extends PureComponent { this.props.options.forEach((option) => { const { value, - checked + checked, } = option; if (!this.state.selected && checked) { @@ -50,7 +50,7 @@ export default class RadioButtonGroup extends PureComponent { onChange = (value) => { const {onSelect} = this.props; this.setState({ - selected: value + selected: value, }, () => { if (onSelect) { onSelect(value); diff --git a/app/components/reactions/index.js b/app/components/reactions/index.js index 2febfef08..441bc7710 100644 --- a/app/components/reactions/index.js +++ b/app/components/reactions/index.js @@ -37,7 +37,7 @@ function makeMapStateToProps() { return { highlightedReactions, reactions: reactionsByName, - theme: getTheme(state) + theme: getTheme(state), }; }; } @@ -47,8 +47,8 @@ function mapDispatchToProps(dispatch) { actions: bindActionCreators({ addReaction, getReactionsForPost, - removeReaction - }, dispatch) + removeReaction, + }, dispatch), }; } diff --git a/app/components/reactions/reaction.js b/app/components/reactions/reaction.js index 1df39fd81..c675fa342 100644 --- a/app/components/reactions/reaction.js +++ b/app/components/reactions/reaction.js @@ -5,7 +5,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { Text, - TouchableOpacity + TouchableOpacity, } from 'react-native'; import Emoji from 'app/components/emoji'; @@ -17,7 +17,7 @@ export default class Reaction extends PureComponent { emojiName: PropTypes.string.isRequired, highlight: PropTypes.bool.isRequired, onPress: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, } handlePress = () => { @@ -49,10 +49,10 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { count: { color: theme.linkColor, - marginLeft: 6 + marginLeft: 6, }, highlight: { - backgroundColor: changeOpacity(theme.linkColor, 0.1) + backgroundColor: changeOpacity(theme.linkColor, 0.1), }, reaction: { alignItems: 'center', @@ -63,7 +63,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { marginRight: 6, marginVertical: 5, paddingVertical: 2, - paddingHorizontal: 6 - } + paddingHorizontal: 6, + }, }; }); diff --git a/app/components/reactions/reactions.js b/app/components/reactions/reactions.js index fc62047ec..7492fa1ad 100644 --- a/app/components/reactions/reactions.js +++ b/app/components/reactions/reactions.js @@ -7,7 +7,7 @@ import { StyleSheet, Text, TouchableOpacity, - View + View, } from 'react-native'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -19,13 +19,13 @@ export default class Reactions extends PureComponent { actions: PropTypes.shape({ addReaction: PropTypes.func.isRequired, getReactionsForPost: PropTypes.func.isRequired, - removeReaction: PropTypes.func.isRequired + removeReaction: PropTypes.func.isRequired, }).isRequired, highlightedReactions: PropTypes.array.isRequired, onAddReaction: PropTypes.func.isRequired, postId: PropTypes.string.isRequired, reactions: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, } componentDidMount() { @@ -89,14 +89,14 @@ const style = StyleSheet.create({ reactions: { flexDirection: 'row', flexWrap: 'wrap', - alignItems: 'flex-start' - } + alignItems: 'flex-start', + }, }); const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { more: { - color: theme.linkColor + color: theme.linkColor, }, reaction: { alignItems: 'center', @@ -107,7 +107,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { marginRight: 6, marginVertical: 5, paddingVertical: 2, - paddingHorizontal: 6 - } + paddingHorizontal: 6, + }, }; }); diff --git a/app/components/refresh_list/index.js b/app/components/refresh_list/index.js index b0f3e661a..8678bbda8 100644 --- a/app/components/refresh_list/index.js +++ b/app/components/refresh_list/index.js @@ -16,7 +16,7 @@ function mapStateToProps(state) { } return { - refreshing + refreshing, }; } diff --git a/app/components/refresh_list/refresh_list.js b/app/components/refresh_list/refresh_list.js index 2ab433840..1d5b7944a 100644 --- a/app/components/refresh_list/refresh_list.js +++ b/app/components/refresh_list/refresh_list.js @@ -6,7 +6,7 @@ import {RefreshControl} from 'react-native'; export default class RefreshList extends PureComponent { static propTypes = { - ...RefreshControl.propTypes + ...RefreshControl.propTypes, }; render() { diff --git a/app/components/reply_icon.js b/app/components/reply_icon.js index 21e507383..74eba5757 100644 --- a/app/components/reply_icon.js +++ b/app/components/reply_icon.js @@ -4,14 +4,14 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import Svg, { - Path + Path, } from 'react-native-svg'; export default class ReplyIcon extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/retry_bar_indicator/index.js b/app/components/retry_bar_indicator/index.js index b6c0c247f..fe95204a3 100644 --- a/app/components/retry_bar_indicator/index.js +++ b/app/components/retry_bar_indicator/index.js @@ -19,7 +19,7 @@ function mapStateToProps(state) { } return { - failed + failed, }; } export default connect(mapStateToProps)(RetryBarIndicator); diff --git a/app/components/retry_bar_indicator/retry_bar_indicator.js b/app/components/retry_bar_indicator/retry_bar_indicator.js index 31f632d94..7b4200520 100644 --- a/app/components/retry_bar_indicator/retry_bar_indicator.js +++ b/app/components/retry_bar_indicator/retry_bar_indicator.js @@ -4,7 +4,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { Animated, - StyleSheet + StyleSheet, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -12,11 +12,11 @@ const {View: AnimatedView} = Animated; export default class RetryBarIndicator extends PureComponent { static propTypes = { - failed: PropTypes.bool + failed: PropTypes.bool, }; state = { - retryMessageHeight: new Animated.Value(0) + retryMessageHeight: new Animated.Value(0), }; componentWillReceiveProps(nextProps) { @@ -29,14 +29,14 @@ export default class RetryBarIndicator extends PureComponent { const value = show ? 38 : 0; Animated.timing(this.state.retryMessageHeight, { toValue: value, - duration: 350 + duration: 350, }).start(); }; render() { const {retryMessageHeight} = this.state; const refreshIndicatorDimensions = { - height: retryMessageHeight + height: retryMessageHeight, }; return ( @@ -60,6 +60,6 @@ const style = StyleSheet.create({ position: 'absolute', top: 0, overflow: 'hidden', - width: '100%' - } + width: '100%', + }, }); diff --git a/app/components/root/index.js b/app/components/root/index.js index 55dc149ff..c2604740c 100644 --- a/app/components/root/index.js +++ b/app/components/root/index.js @@ -21,7 +21,7 @@ function mapStateToProps(state) { theme: getTheme(state), currentChannelId: getCurrentChannelId(state), currentUrl: removeProtocol(getCurrentUrl(state)), - locale + locale, }; } diff --git a/app/components/root/root.js b/app/components/root/root.js index 1a27d2c1f..1237dd29a 100644 --- a/app/components/root/root.js +++ b/app/components/root/root.js @@ -19,7 +19,7 @@ export default class Root extends PureComponent { currentChannelId: PropTypes.string, currentUrl: PropTypes.string, locale: PropTypes.string.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; componentDidMount() { @@ -49,8 +49,8 @@ export default class Root extends PureComponent { autoDismissTimerSec: 5, dismissWithSwipe: true, passProps: { - notification - } + notification, + }, }); } }; @@ -66,16 +66,16 @@ export default class Root extends PureComponent { title: intl.formatMessage({id: 'sidebar_right_menu.logout', defaultMessage: 'Logout'}), id: 'logout', buttonColor: theme.sidebarHeaderTextColor, - showAsAction: 'always' - }] + showAsAction: 'always', + }], }; } else { navigatorButtons = { leftButtons: [{ title: intl.formatMessage({id: 'sidebar_right_menu.logout', defaultMessage: 'Logout'}), id: 'logout', - buttonColor: theme.sidebarHeaderTextColor - }] + buttonColor: theme.sidebarHeaderTextColor, + }], }; } @@ -88,14 +88,14 @@ export default class Root extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, navigatorButtons, passProps: { currentUrl, userWithoutTeams: true, - theme - } + theme, + }, }); }; @@ -107,7 +107,7 @@ export default class Root extends PureComponent { } navigator.popToRoot({ - animated: false + animated: false, }); }; diff --git a/app/components/safe_area_view/index.js b/app/components/safe_area_view/index.js index 3840d8cdb..d1b3f743e 100644 --- a/app/components/safe_area_view/index.js +++ b/app/components/safe_area_view/index.js @@ -9,7 +9,7 @@ import SafeAreaView from './safe_area_view'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/safe_area_view/safe_area_view.android.js b/app/components/safe_area_view/safe_area_view.android.js index 7fdea6e86..fae19f966 100644 --- a/app/components/safe_area_view/safe_area_view.android.js +++ b/app/components/safe_area_view/safe_area_view.android.js @@ -9,7 +9,7 @@ export default class SafeAreaAndroid extends PureComponent { static propTypes = { backgroundColor: PropTypes.string, children: PropTypes.node.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { @@ -29,6 +29,6 @@ export default class SafeAreaAndroid extends PureComponent { const style = StyleSheet.create({ container: { - flex: 1 - } + flex: 1, + }, }); diff --git a/app/components/safe_area_view/safe_area_view.ios.js b/app/components/safe_area_view/safe_area_view.ios.js index e6ef0c16b..bb3f7e442 100644 --- a/app/components/safe_area_view/safe_area_view.ios.js +++ b/app/components/safe_area_view/safe_area_view.ios.js @@ -22,11 +22,11 @@ export default class SafeAreaIos extends PureComponent { navBarBackgroundColor: PropTypes.string, navigator: PropTypes.object, headerComponent: PropTypes.node, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - keyboardOffset: 0 + keyboardOffset: 0, }; constructor(props) { @@ -41,9 +41,9 @@ export default class SafeAreaIos extends PureComponent { this.state = { keyboard: false, safeAreaInsets: { - top: 20, left: 0, bottom: 15, right: 0 + top: 20, left: 0, bottom: 15, right: 0, }, - statusBarHeight: 20 + statusBarHeight: 20, }; } @@ -137,7 +137,7 @@ export default class SafeAreaIos extends PureComponent { style={{ backgroundColor: topColor, height: top, - zIndex: 10 + zIndex: 10, }} > {headerComponent} @@ -150,7 +150,7 @@ export default class SafeAreaIos extends PureComponent { style={{ backgroundColor: topColor, paddingTop: top, - zIndex: 10 + zIndex: 10, }} /> ); @@ -179,7 +179,7 @@ export default class SafeAreaIos extends PureComponent { {this.renderTopBar()} diff --git a/app/components/search_bar/search_bar.android.js b/app/components/search_bar/search_bar.android.js index e32631d49..17dac6e79 100644 --- a/app/components/search_bar/search_bar.android.js +++ b/app/components/search_bar/search_bar.android.js @@ -8,7 +8,7 @@ import { TextInput, StyleSheet, View, - TouchableWithoutFeedback + TouchableWithoutFeedback, } from 'react-native'; import Icon from 'react-native-vector-icons/MaterialIcons'; @@ -42,7 +42,7 @@ export default class SearchBarAndroid extends PureComponent { inputBorderRadius: PropTypes.number, blurOnSubmit: PropTypes.bool, value: PropTypes.string, - containerStyle: CustomPropTypes.Style + containerStyle: CustomPropTypes.Style, }; static defaultProps = { @@ -60,14 +60,14 @@ export default class SearchBarAndroid extends PureComponent { onFocus: () => true, onBlur: () => true, onSelectionChange: () => true, - value: '' + value: '', }; constructor(props) { super(props); this.state = { value: props.value, - isFocused: false + isFocused: false, }; } componentWillReceiveProps(nextProps) { @@ -96,7 +96,7 @@ export default class SearchBarAndroid extends PureComponent { Keyboard.dismiss(); InteractionManager.runAfterInteractions(() => { this.setState({ - isFocused: false + isFocused: false, }, () => { this.props.onCancelButtonPress(); }); @@ -149,12 +149,12 @@ export default class SearchBarAndroid extends PureComponent { tintColorDelete, tintColorSearch, containerStyle, - value + value, } = this.props; const {isFocused} = this.state; const inputNoBackground = { - ...inputStyle + ...inputStyle, }; Reflect.deleteProperty(inputNoBackground, 'backgroundColor'); @@ -171,7 +171,7 @@ export default class SearchBarAndroid extends PureComponent { styles.container, containerStyle, {height: inputHeight}, - backgroundColor && {backgroundColor} + backgroundColor && {backgroundColor}, ]} > {isFocused ? @@ -221,7 +221,7 @@ export default class SearchBarAndroid extends PureComponent { disableFullscreenUI={true} style={[ styles.searchBarInput, - inputNoBackground + inputNoBackground, ]} /> {isFocused && value ? @@ -245,21 +245,21 @@ const styles = StyleSheet.create({ backgroundColor: 'grey', flexDirection: 'row', justifyContent: 'flex-start', - alignItems: 'center' + alignItems: 'center', }, searchBar: { flex: 1, flexDirection: 'row', - alignItems: 'center' + alignItems: 'center', }, searchBarInput: { flex: 1, fontWeight: 'normal', textAlignVertical: 'center', fontSize: 15, - includeFontPadding: true + includeFontPadding: true, }, searchBarBlurredInput: { - padding: 0 - } + padding: 0, + }, }); diff --git a/app/components/search_bar/search_bar.ios.js b/app/components/search_bar/search_bar.ios.js index c355d0fcd..1fad511c3 100644 --- a/app/components/search_bar/search_bar.ios.js +++ b/app/components/search_bar/search_bar.ios.js @@ -27,7 +27,7 @@ export default class SearchBarIos extends PureComponent { placeholder: PropTypes.string, cancelTitle: PropTypes.oneOfType([ PropTypes.string, - PropTypes.object + PropTypes.object, ]), returnKeyType: PropTypes.string, keyboardType: PropTypes.string, @@ -35,7 +35,7 @@ export default class SearchBarIos extends PureComponent { inputHeight: PropTypes.number, inputBorderRadius: PropTypes.number, blurOnSubmit: PropTypes.bool, - value: PropTypes.string + value: PropTypes.string, }; static defaultProps = { @@ -45,7 +45,7 @@ export default class SearchBarIos extends PureComponent { onFocus: () => true, onBlur: () => true, onSelectionChange: () => true, - blurOnSubmit: true + blurOnSubmit: true, }; cancel = () => { diff --git a/app/components/search_bar/search_box.js b/app/components/search_bar/search_box.js index cebfbba4d..2d6061a1e 100644 --- a/app/components/search_bar/search_box.js +++ b/app/components/search_bar/search_box.js @@ -13,7 +13,7 @@ import { TextInput, TouchableWithoutFeedback, StyleSheet, - View + View, } from 'react-native'; import EvilIcon from 'react-native-vector-icons/EvilIcons'; import IonIcon from 'react-native-vector-icons/Ionicons'; @@ -48,7 +48,7 @@ export default class Search extends Component { placeholder: PropTypes.string, cancelTitle: PropTypes.oneOfType([ PropTypes.string, - PropTypes.object + PropTypes.object, ]), iconDelete: PropTypes.object, iconSearch: PropTypes.object, @@ -75,7 +75,7 @@ export default class Search extends Component { shadowOpacityCollapsed: PropTypes.number, shadowOpacityExpanded: PropTypes.number, shadowRadius: PropTypes.number, - shadowVisible: PropTypes.bool + shadowVisible: PropTypes.bool, }; static defaultProps = { @@ -97,14 +97,14 @@ export default class Search extends Component { shadowOpacityExpanded: 0.24, shadowRadius: 4, shadowVisible: false, - value: '' + value: '', }; constructor(props) { super(props); this.state = { - expanded: false + expanded: false, }; const {width} = Dimensions.get('window'); this.contentWidth = width; @@ -177,7 +177,7 @@ export default class Search extends Component { this.iconDeleteAnimated, { toValue: (text.length > 0) ? 1 : 0, - duration: 200 + duration: 200, } ).start(); @@ -202,7 +202,7 @@ export default class Search extends Component { this.iconDeleteAnimated, { toValue: 0, - duration: 200 + duration: 200, } ).start(); this.focus(); @@ -232,44 +232,44 @@ export default class Search extends Component { this.inputFocusWidthAnimated, { toValue: this.contentWidth - 70, - duration: 200 + duration: 200, } ).start(), Animated.timing( this.btnCancelAnimated, { toValue: 10, - duration: 200 + duration: 200, } ).start(), Animated.timing( this.inputFocusPlaceholderAnimated, { toValue: this.props.placeholderExpandedMargin, - duration: 200 + duration: 200, } ).start(), Animated.timing( this.iconSearchAnimated, { toValue: this.props.searchIconExpandedMargin, - duration: 200 + duration: 200, } ).start(), Animated.timing( this.iconDeleteAnimated, { toValue: (this.props.value.length > 0) ? 1 : 0, - duration: 200 + duration: 200, } ).start(), Animated.timing( this.shadowOpacityAnimated, { toValue: this.props.shadowOpacityExpanded, - duration: 200 + duration: 200, } - ).start() + ).start(), ]); this.shadowHeight = this.props.shadowOffsetHeightExpanded; resolve(); @@ -284,14 +284,14 @@ export default class Search extends Component { this.inputFocusWidthAnimated, { toValue: this.contentWidth - 10, - duration: 200 + duration: 200, } ).start(), Animated.timing( this.btnCancelAnimated, { toValue: this.contentWidth, - duration: 200 + duration: 200, } ).start(), ((this.props.keyboardShouldPersist === false) ? @@ -299,7 +299,7 @@ export default class Search extends Component { this.inputFocusPlaceholderAnimated, { toValue: this.props.placeholderCollapsedMargin, - duration: 200 + duration: 200, } ).start() : null), ((this.props.keyboardShouldPersist === false || isForceAnim === true) ? @@ -307,23 +307,23 @@ export default class Search extends Component { this.iconSearchAnimated, { toValue: this.props.searchIconCollapsedMargin, - duration: 200 + duration: 200, } ).start() : null), Animated.timing( this.iconDeleteAnimated, { toValue: 0, - duration: 200 + duration: 200, } ).start(), Animated.timing( this.shadowOpacityAnimated, { toValue: this.props.shadowOpacityCollapsed, - duration: 200 + duration: 200, } - ).start() + ).start(), ]); this.shadowHeight = this.props.shadowOffsetHeightCollapsed; resolve(); @@ -336,7 +336,7 @@ export default class Search extends Component { ref='searchContainer' style={[ styles.container, - this.props.backgroundColor && {backgroundColor: this.props.backgroundColor} + this.props.backgroundColor && {backgroundColor: this.props.backgroundColor}, ]} onLayout={this.onLayout} > @@ -350,14 +350,14 @@ export default class Search extends Component { this.props.inputBorderRadius && {borderRadius: this.props.inputBorderRadius}, { width: this.inputFocusWidthAnimated, - paddingLeft: this.inputFocusPlaceholderAnimated + paddingLeft: this.inputFocusPlaceholderAnimated, }, this.props.shadowVisible && { shadowOffset: {width: this.props.shadowOffsetWidth, height: this.shadowHeight}, shadowColor: this.props.shadowColor, shadowOpacity: this.shadowOpacityAnimated, - shadowRadius: this.props.shadowRadius - } + shadowRadius: this.props.shadowRadius, + }, ]} autoFocus={this.props.autoFocus} @@ -384,7 +384,7 @@ export default class Search extends Component { {this.props.iconSearch} @@ -398,8 +398,8 @@ export default class Search extends Component { this.props.tintColorSearch && {color: this.props.tintColorSearch}, { left: this.iconSearchAnimated, - top: middleHeight - 10 - } + top: middleHeight - 10, + }, ]} /> )} @@ -410,7 +410,7 @@ export default class Search extends Component { style={[ styles.iconDelete, this.props.positionRightDelete && {right: this.props.positionRightDelete}, - {opacity: this.iconDeleteAnimated} + {opacity: this.iconDeleteAnimated}, ]} > {this.props.iconDelete} @@ -424,8 +424,8 @@ export default class Search extends Component { this.props.tintColorDelete && {color: this.props.tintColorDelete}, this.props.positionRightDelete && {right: this.props.positionRightDelete}, { - opacity: this.iconDeleteAnimated - } + opacity: this.iconDeleteAnimated, + }, ]} /> @@ -436,14 +436,14 @@ export default class Search extends Component { style={[ styles.cancelButton, this.props.cancelButtonStyle && this.props.cancelButtonStyle, - {left: this.btnCancelAnimated} + {left: this.btnCancelAnimated}, ]} > {this.cancelTitle} @@ -462,7 +462,7 @@ const styles = StyleSheet.create({ flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', - padding: 5 + padding: 5, }, input: { height: containerHeight - 10, @@ -472,14 +472,14 @@ const styles = StyleSheet.create({ borderColor: '#444', backgroundColor: '#f7f7f7', borderRadius: 5, - fontSize: 15 + fontSize: 15, }, iconSearch: { flex: 1, - position: 'absolute' + position: 'absolute', }, iconSearchDefault: { - color: 'grey' + color: 'grey', }, iconDelete: { alignItems: 'flex-start', @@ -488,21 +488,21 @@ const styles = StyleSheet.create({ paddingLeft: 1, paddingTop: 3, right: 65, - width: 25 + width: 25, }, iconDeleteDefault: { - color: 'grey' + color: 'grey', }, cancelButton: { justifyContent: 'center', alignItems: 'flex-start', backgroundColor: 'transparent', width: 60, - height: 50 + height: 50, }, cancelButtonText: { fontSize: 14, - color: '#fff' - } + color: '#fff', + }, }); diff --git a/app/components/search_preview/index.js b/app/components/search_preview/index.js index bae5751e1..3fb34d422 100644 --- a/app/components/search_preview/index.js +++ b/app/components/search_preview/index.js @@ -22,7 +22,7 @@ function makeMapStateToProps() { return { channelName: channel ? channel.display_name : '', currentUserId: getCurrentUserId(state), - postIds + postIds, }; }; } @@ -32,8 +32,8 @@ function mapDispatchToProps(dispatch) { actions: bindActionCreators({ getPostsAfter, getPostsBefore, - getPostThread - }, dispatch) + getPostThread, + }, dispatch), }; } diff --git a/app/components/search_preview/search_preview.js b/app/components/search_preview/search_preview.js index fa0be7614..ecd519938 100644 --- a/app/components/search_preview/search_preview.js +++ b/app/components/search_preview/search_preview.js @@ -7,7 +7,7 @@ import { Platform, Text, TouchableOpacity, - View + View, } from 'react-native'; import * as Animatable from 'react-native-animatable'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; @@ -22,17 +22,17 @@ Animatable.initializeRegistryWithDefinitions({ growOut: { from: { opacity: 1, - scale: 1 + scale: 1, }, 0.5: { opacity: 1, - scale: 3 + scale: 3, }, to: { opacity: 0, - scale: 5 - } - } + scale: 5, + }, + }, }); export default class SearchPreview extends PureComponent { @@ -40,7 +40,7 @@ export default class SearchPreview extends PureComponent { actions: PropTypes.shape({ getPostsAfter: PropTypes.func.isRequired, getPostsBefore: PropTypes.func.isRequired, - getPostThread: PropTypes.func.isRequired + getPostThread: PropTypes.func.isRequired, }).isRequired, channelId: PropTypes.string, channelName: PropTypes.string, @@ -50,11 +50,11 @@ export default class SearchPreview extends PureComponent { onClose: PropTypes.func, onPress: PropTypes.func, postIds: PropTypes.array, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - postIds: [] + postIds: [], }; constructor(props) { @@ -68,7 +68,7 @@ export default class SearchPreview extends PureComponent { this.state = { show, - error: false + error: false, }; } @@ -106,7 +106,7 @@ export default class SearchPreview extends PureComponent { const result = await Promise.all([ actions.getPostThread(focusedPostId, false), actions.getPostsBefore(channelId, focusedPostId, 0, 5), - actions.getPostsAfter(channelId, focusedPostId, 0, 5) + actions.getPostsAfter(channelId, focusedPostId, 0, 5), ]); const error = result.some((res) => Boolean(res.error)); @@ -125,7 +125,7 @@ export default class SearchPreview extends PureComponent { focusedPostId, navigator, postIds, - theme + theme, } = this.props; const style = getStyleSheet(theme); @@ -218,7 +218,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { top: 0, left: 0, zIndex: 10, - width: '100%' + width: '100%', }, wrapper: { flex: 1, @@ -227,12 +227,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { opacity: 0, ...Platform.select({ android: { - marginTop: 10 + marginTop: 10, }, ios: { - marginTop: 20 - } - }) + marginTop: 20, + }, + }), }, header: { alignItems: 'center', @@ -244,27 +244,27 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flexDirection: 'row', height: 44, paddingRight: 16, - width: '100%' + width: '100%', }, close: { justifyContent: 'center', height: 44, width: 40, - paddingLeft: 7 + paddingLeft: 7, }, titleContainer: { alignItems: 'center', flex: 1, - paddingRight: 40 + paddingRight: 40, }, title: { color: theme.centerChannelColor, fontSize: 17, - fontWeight: '600' + fontWeight: '600', }, postList: { backgroundColor: theme.centerChannelBg, - flex: 1 + flex: 1, }, footer: { alignItems: 'center', @@ -275,13 +275,13 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flexDirection: 'row', height: 44, paddingRight: 16, - width: '100%' + width: '100%', }, jump: { color: theme.buttonColor, fontSize: 16, fontWeight: '600', - textAlignVertical: 'center' - } + textAlignVertical: 'center', + }, }; }); diff --git a/app/components/settings_drawer/drawer_item.js b/app/components/settings_drawer/drawer_item.js index 915f06353..a8778a41f 100644 --- a/app/components/settings_drawer/drawer_item.js +++ b/app/components/settings_drawer/drawer_item.js @@ -21,13 +21,13 @@ export default class DrawerItem extends PureComponent { leftComponent: PropTypes.node, onPress: PropTypes.func, separator: PropTypes.bool, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { defaultMessage: '', isDestructor: false, - separator: true + separator: true, }; render() { @@ -42,7 +42,7 @@ export default class DrawerItem extends PureComponent { leftComponent, onPress, separator, - theme + theme, } = this.props; const style = getStyleSheet(theme); @@ -110,41 +110,41 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { alignItems: 'center', backgroundColor: theme.centerChannelBg, flexDirection: 'row', - height: 50 + height: 50, }, iconContainer: { width: 45, height: 50, alignItems: 'center', justifyContent: 'center', - marginLeft: 5 + marginLeft: 5, }, icon: { color: theme.linkColor, - fontSize: 22 + fontSize: 22, }, wrapper: { - flex: 1 + flex: 1, }, labelContainer: { alignItems: 'center', flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, centerLabel: { textAlign: 'center', - textAlignVertical: 'center' + textAlignVertical: 'center', }, label: { color: changeOpacity(theme.centerChannelColor, 0.5), flex: 1, fontSize: 17, textAlignVertical: 'center', - includeFontPadding: false + includeFontPadding: false, }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), - height: 1 - } + height: 1, + }, }; }); diff --git a/app/components/settings_drawer/index.js b/app/components/settings_drawer/index.js index 1d604b73a..9e61b5b11 100644 --- a/app/components/settings_drawer/index.js +++ b/app/components/settings_drawer/index.js @@ -13,7 +13,7 @@ import {getCurrentUser} from 'mattermost-redux/selectors/entities/users'; function mapStateToProps(state) { return { currentUser: getCurrentUser(state), - theme: getTheme(state) + theme: getTheme(state), }; } @@ -21,8 +21,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ logout, - setStatus - }, dispatch) + setStatus, + }, dispatch), }; } diff --git a/app/components/settings_drawer/settings_drawer.js b/app/components/settings_drawer/settings_drawer.js index 1aa1ff9b8..e0925279d 100644 --- a/app/components/settings_drawer/settings_drawer.js +++ b/app/components/settings_drawer/settings_drawer.js @@ -10,7 +10,7 @@ import { Keyboard, Platform, ScrollView, - View + View, } from 'react-native'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; @@ -34,21 +34,21 @@ export default class SettingsDrawer extends PureComponent { static propTypes = { actions: PropTypes.shape({ logout: PropTypes.func.isRequired, - setStatus: PropTypes.func.isRequired + setStatus: PropTypes.func.isRequired, }).isRequired, blurPostTextBox: PropTypes.func.isRequired, children: PropTypes.node, currentUser: PropTypes.object.isRequired, navigator: PropTypes.object, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - currentUser: {} + currentUser: {}, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props) { @@ -102,8 +102,8 @@ export default class SettingsDrawer extends PureComponent { mainOverlay: { backgroundColor: '#000', elevation: 3, - opacity - } + opacity, + }, }; }; @@ -140,26 +140,26 @@ export default class SettingsDrawer extends PureComponent { action: () => this.setStatus(General.ONLINE), text: { id: 'mobile.set_status.online', - defaultMessage: 'Online' - } + defaultMessage: 'Online', + }, }, { action: () => this.setStatus(General.AWAY), text: { id: 'mobile.set_status.away', - defaultMessage: 'Away' - } + defaultMessage: 'Away', + }, }, { action: () => this.setStatus(General.DND), text: { id: 'mobile.set_status.dnd', - defaultMessage: 'Do Not Disturb' - } + defaultMessage: 'Do Not Disturb', + }, }, { action: () => this.setStatus(General.OFFLINE), text: { id: 'mobile.set_status.offline', - defaultMessage: 'Offline' - } + defaultMessage: 'Offline', + }, }]; this.props.navigator.showModal({ @@ -167,15 +167,15 @@ export default class SettingsDrawer extends PureComponent { title: '', animationType: 'none', passProps: { - items + items, }, navigatorStyle: { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, screenBackgroundColor: 'transparent', - modalPresentationStyle: 'overCurrentContext' - } + modalPresentationStyle: 'overCurrentContext', + }, }); }); @@ -194,17 +194,17 @@ export default class SettingsDrawer extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, navigatorButtons: { leftButtons: [{ id: 'close-settings', - icon: this.closeButton - }] + icon: this.closeButton, + }], }, passProps: { - currentUser - } + currentUser, + }, }); }); @@ -223,14 +223,14 @@ export default class SettingsDrawer extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, navigatorButtons: { leftButtons: [{ id: 'close-settings', - icon: this.closeButton - }] - } + icon: this.closeButton, + }], + }, }); }); @@ -318,7 +318,7 @@ export default class SettingsDrawer extends PureComponent { const {currentUser: {id: currentUserId}} = this.props; this.props.actions.setStatus({ user_id: currentUserId, - status + status, }); EventEmitter.emit(NavigationTypes.NAVIGATION_CLOSE_MODAL); }; @@ -361,9 +361,9 @@ export default class SettingsDrawer extends PureComponent { shadowRadius: 12, shadowOffset: { width: -4, - height: 0 - } - } + height: 0, + }, + }, }} > {children} @@ -376,24 +376,24 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.03) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.03), }, wrapper: { flex: 1, - paddingTop: 0 + paddingTop: 0, }, block: { borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1), borderBottomWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.1), - borderTopWidth: 1 + borderTopWidth: 1, }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), - height: 1 + height: 1, }, separator: { - marginTop: 35 - } + marginTop: 35, + }, }; }); diff --git a/app/components/settings_drawer/status_label/index.js b/app/components/settings_drawer/status_label/index.js index 2908adb66..f283550f5 100644 --- a/app/components/settings_drawer/status_label/index.js +++ b/app/components/settings_drawer/status_label/index.js @@ -11,7 +11,7 @@ import StatusLabel from './status_label'; function mapStateToProps(state, ownProps) { return { status: getStatusForUserId(state, ownProps.userId), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/settings_drawer/status_label/status_label.js b/app/components/settings_drawer/status_label/status_label.js index 4286f7b3e..62ca740a8 100644 --- a/app/components/settings_drawer/status_label/status_label.js +++ b/app/components/settings_drawer/status_label/status_label.js @@ -12,11 +12,11 @@ import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; export default class UserInfo extends PureComponent { static propTypes = { status: PropTypes.string, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - status: General.OFFLINE + status: General.OFFLINE, }; render() { @@ -57,7 +57,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flex: 1, fontSize: 17, textAlignVertical: 'center', - includeFontPadding: false - } + includeFontPadding: false, + }, }; }); diff --git a/app/components/settings_drawer/user_info/index.js b/app/components/settings_drawer/user_info/index.js index ed2502623..f518adc72 100644 --- a/app/components/settings_drawer/user_info/index.js +++ b/app/components/settings_drawer/user_info/index.js @@ -9,7 +9,7 @@ import UserInfo from './user_info'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/settings_drawer/user_info/user_info.js b/app/components/settings_drawer/user_info/user_info.js index 63a955e89..cb0e320ac 100644 --- a/app/components/settings_drawer/user_info/user_info.js +++ b/app/components/settings_drawer/user_info/user_info.js @@ -14,11 +14,11 @@ export default class UserInfo extends PureComponent { static propTypes = { user: PropTypes.object.isRequired, onPress: PropTypes.func, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - onPress: emptyFunction + onPress: emptyFunction, }; render() { @@ -66,20 +66,20 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { container: { alignItems: 'center', padding: 15, - flexDirection: 'row' + flexDirection: 'row', }, wrapper: { - marginLeft: 10 + marginLeft: 10, }, username: { color: theme.centerChannelColor, marginVertical: 5, fontWeight: '600', - fontSize: 15 + fontSize: 15, }, fullName: { color: changeOpacity(theme.centerChannelColor, 0.5), - fontSize: 15 - } + fontSize: 15, + }, }; }); diff --git a/app/components/slack_attachments/index.js b/app/components/slack_attachments/index.js index f0b93670a..745000827 100644 --- a/app/components/slack_attachments/index.js +++ b/app/components/slack_attachments/index.js @@ -18,7 +18,7 @@ export default class SlackAttachments extends PureComponent { navigator: PropTypes.object.isRequired, onLongPress: PropTypes.func.isRequired, theme: PropTypes.object, - textStyles: PropTypes.object + textStyles: PropTypes.object, }; render() { diff --git a/app/components/slack_attachments/interactive_action/index.js b/app/components/slack_attachments/interactive_action/index.js index dd7e40e53..8727de639 100644 --- a/app/components/slack_attachments/interactive_action/index.js +++ b/app/components/slack_attachments/interactive_action/index.js @@ -11,15 +11,15 @@ import InteractiveAction from './interactive_action'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - doPostAction - }, dispatch) + doPostAction, + }, dispatch), }; } diff --git a/app/components/slack_attachments/interactive_action/interactive_action.js b/app/components/slack_attachments/interactive_action/interactive_action.js index b121da32b..8e27436a3 100644 --- a/app/components/slack_attachments/interactive_action/interactive_action.js +++ b/app/components/slack_attachments/interactive_action/interactive_action.js @@ -12,12 +12,12 @@ import {makeStyleSheetFromTheme} from 'app/utils/theme'; export default class InteractiveAction extends PureComponent { static propTypes = { actions: PropTypes.shape({ - doPostAction: PropTypes.func.isRequired + doPostAction: PropTypes.func.isRequired, }).isRequired, id: PropTypes.string.isRequired, name: PropTypes.string.isRequired, postId: PropTypes.string.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; handleActionPress = wrapWithPreventDoubleTap(() => { @@ -50,12 +50,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { marginRight: 5, marginTop: 10, paddingHorizontal: 10, - paddingVertical: 7 + paddingVertical: 7, }, text: { color: theme.buttonColor, fontSize: 12, - fontWeight: '600' - } + fontWeight: '600', + }, }; }); diff --git a/app/components/slack_attachments/slack_attachment.js b/app/components/slack_attachments/slack_attachment.js index db45160ce..738dcf4bf 100644 --- a/app/components/slack_attachments/slack_attachment.js +++ b/app/components/slack_attachments/slack_attachment.js @@ -7,7 +7,7 @@ import { Image, Linking, Text, - View + View, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -20,7 +20,7 @@ import InteractiveAction from './interactive_action'; const STATUS_COLORS = { good: '#00c100', warning: '#dede01', - danger: '#e40303' + danger: '#e40303', }; export default class SlackAttachment extends PureComponent { @@ -32,7 +32,7 @@ export default class SlackAttachment extends PureComponent { postId: PropTypes.string.isRequired, onLongPress: PropTypes.func.isRequired, theme: PropTypes.object, - textStyles: PropTypes.object + textStyles: PropTypes.object, }; constructor(props) { @@ -93,7 +93,7 @@ export default class SlackAttachment extends PureComponent { collapsedText, uncollapsedText, text: shouldCollapse ? collapsedText : uncollapsedText, - collapsed: shouldCollapse + collapsed: shouldCollapse, }; }; @@ -103,7 +103,7 @@ export default class SlackAttachment extends PureComponent { baseTextStyle, blockStyles, navigator, - textStyles + textStyles, } = this.props; const fields = attachment.fields; if (!fields || !fields.length) { @@ -212,7 +212,7 @@ export default class SlackAttachment extends PureComponent { blockStyles, textStyles, navigator, - theme + theme, } = this.props; const style = getStyleSheet(theme); @@ -389,75 +389,75 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderColor: changeOpacity(theme.centerChannelColor, 0.15), borderWidth: 1, marginTop: 5, - padding: 10 + padding: 10, }, border: { borderLeftColor: changeOpacity(theme.linkColor, 0.6), - borderLeftWidth: 3 + borderLeftWidth: 3, }, author: { color: changeOpacity(theme.centerChannelColor, 0.5), - fontSize: 11 + fontSize: 11, }, authorIcon: { height: 12, marginRight: 3, - width: 12 + width: 12, }, authorLink: { - color: changeOpacity(theme.linkColor, 0.5) + color: changeOpacity(theme.linkColor, 0.5), }, title: { color: theme.centerChannelColor, fontWeight: '600', - marginBottom: 5 + marginBottom: 5, }, titleLink: { - color: theme.linkColor + color: theme.linkColor, }, topContent: { - paddingRight: 60 + paddingRight: 60, }, thumbContainer: { position: 'absolute', right: 10, - top: 10 + top: 10, }, thumb: { height: 45, - width: 45 + width: 45, }, moreLess: { color: theme.linkColor, - fontSize: 12 + fontSize: 12, }, headingContainer: { alignSelf: 'stretch', flexDirection: 'row', marginBottom: 5, - marginTop: 10 + marginTop: 10, }, heading: { color: theme.centerChannelColor, - fontWeight: '600' + fontWeight: '600', }, bodyContainer: { - flex: 1 + flex: 1, }, imageContainer: { borderColor: changeOpacity(theme.centerChannelColor, 0.1), borderWidth: 1, borderRadius: 2, - marginTop: 5 + marginTop: 5, }, image: { flex: 1, - height: 50 + height: 50, }, actionsContainer: { flex: 1, flexDirection: 'row', - flexWrap: 'wrap' - } + flexWrap: 'wrap', + }, }; }); diff --git a/app/components/status_bar/index.js b/app/components/status_bar/index.js index a310c0b9a..1e0e5a378 100644 --- a/app/components/status_bar/index.js +++ b/app/components/status_bar/index.js @@ -9,7 +9,7 @@ import StatusBar from './status_bar'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/status_bar/status_bar.js b/app/components/status_bar/status_bar.js index e13f3b7c7..f7f6da0ba 100644 --- a/app/components/status_bar/status_bar.js +++ b/app/components/status_bar/status_bar.js @@ -5,13 +5,13 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { Platform, - StatusBar as NativeStatusBar + StatusBar as NativeStatusBar, } from 'react-native'; import tinyColor from 'tinycolor2'; export default class StatusBar extends PureComponent { static propTypes = { - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { diff --git a/app/components/status_icons/archive_icon.js b/app/components/status_icons/archive_icon.js index 126102b4a..3e65c975d 100644 --- a/app/components/status_icons/archive_icon.js +++ b/app/components/status_icons/archive_icon.js @@ -5,14 +5,14 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { - Path + Path, } from 'react-native-svg'; export default class ArchiveIcon extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/status_icons/away_avatar.js b/app/components/status_icons/away_avatar.js index 173ab564b..ba835fd0d 100644 --- a/app/components/status_icons/away_avatar.js +++ b/app/components/status_icons/away_avatar.js @@ -7,14 +7,14 @@ import {View} from 'react-native'; import Svg, { Circle, G, - Path + Path, } from 'react-native-svg'; export default class AwayAvatar extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/status_icons/away_icon.js b/app/components/status_icons/away_icon.js index aafa99b27..52bbec9c6 100644 --- a/app/components/status_icons/away_icon.js +++ b/app/components/status_icons/away_icon.js @@ -5,14 +5,14 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { - Path + Path, } from 'react-native-svg'; export default class AwayIcon extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/status_icons/dnd_avatar.js b/app/components/status_icons/dnd_avatar.js index f9e833835..316954ebf 100644 --- a/app/components/status_icons/dnd_avatar.js +++ b/app/components/status_icons/dnd_avatar.js @@ -7,14 +7,14 @@ import {View} from 'react-native'; import Svg, { Ellipse, G, - Path + Path, } from 'react-native-svg'; export default class DndAvatar extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/status_icons/dnd_icon.js b/app/components/status_icons/dnd_icon.js index 384658409..20ac09ee8 100644 --- a/app/components/status_icons/dnd_icon.js +++ b/app/components/status_icons/dnd_icon.js @@ -5,13 +5,13 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { - Path + Path, } from 'react-native-svg'; export default class DndIcon extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/status_icons/index.js b/app/components/status_icons/index.js index 615c5983a..32a358c6f 100644 --- a/app/components/status_icons/index.js +++ b/app/components/status_icons/index.js @@ -20,5 +20,5 @@ export { OfflineAvatar, OfflineIcon, OnlineAvatar, - OnlineIcon + OnlineIcon, }; diff --git a/app/components/status_icons/offline_avatar.js b/app/components/status_icons/offline_avatar.js index d82b4d1f1..e4e163f57 100644 --- a/app/components/status_icons/offline_avatar.js +++ b/app/components/status_icons/offline_avatar.js @@ -7,14 +7,14 @@ import {View} from 'react-native'; import Svg, { Ellipse, G, - Path + Path, } from 'react-native-svg'; export default class OfflineStatus extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/status_icons/offline_icon.js b/app/components/status_icons/offline_icon.js index 6921cd584..0497bee43 100644 --- a/app/components/status_icons/offline_icon.js +++ b/app/components/status_icons/offline_icon.js @@ -5,14 +5,14 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { - Path + Path, } from 'react-native-svg'; export default class OfflineIcon extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/status_icons/online_avatar.js b/app/components/status_icons/online_avatar.js index 61b25fce9..e14ba2710 100644 --- a/app/components/status_icons/online_avatar.js +++ b/app/components/status_icons/online_avatar.js @@ -7,14 +7,14 @@ import {View} from 'react-native'; import Svg, { Ellipse, G, - Path + Path, } from 'react-native-svg'; export default class OnlineStatus extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/status_icons/online_icon.js b/app/components/status_icons/online_icon.js index fb0121449..f8cd4ef52 100644 --- a/app/components/status_icons/online_icon.js +++ b/app/components/status_icons/online_icon.js @@ -5,14 +5,14 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { - Path + Path, } from 'react-native-svg'; export default class OnlineIcon extends PureComponent { static propTypes = { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, - color: PropTypes.string.isRequired + color: PropTypes.string.isRequired, }; render() { diff --git a/app/components/swiper.js b/app/components/swiper.js index 138bece8a..d6328edf4 100644 --- a/app/components/swiper.js +++ b/app/components/swiper.js @@ -8,7 +8,7 @@ import { ScrollView, ViewPagerAndroid, Platform, - StyleSheet, InteractionManager + StyleSheet, InteractionManager, } from 'react-native'; export default class Swiper extends PureComponent { @@ -21,16 +21,16 @@ export default class Swiper extends PureComponent { onIndexChanged: PropTypes.func, paginationStyle: PropTypes.oneOfType([ PropTypes.object, - PropTypes.number + PropTypes.number, ]), scrollEnabled: PropTypes.bool, showsPagination: PropTypes.bool, style: PropTypes.oneOfType([ PropTypes.object, - PropTypes.number + PropTypes.number, ]), width: PropTypes.number, - onScrollBegin: PropTypes.func + onScrollBegin: PropTypes.func, }; static defaultProps = { @@ -39,7 +39,7 @@ export default class Swiper extends PureComponent { onIndexChanged: () => null, scrollEnabled: true, showsPagination: true, - onScrollBegin: () => true + onScrollBegin: () => true, }; constructor(props) { @@ -64,7 +64,7 @@ export default class Swiper extends PureComponent { return { index, - total: React.Children.count(props.children) + total: React.Children.count(props.children), }; }; @@ -129,7 +129,7 @@ export default class Swiper extends PureComponent { renderScrollView = (pages) => { const { keyboardShouldPersistTaps, - scrollEnabled + scrollEnabled, } = this.props; if (Platform.OS === 'ios') { @@ -178,7 +178,7 @@ export default class Swiper extends PureComponent { ); @@ -186,7 +186,7 @@ export default class Swiper extends PureComponent { ); @@ -224,8 +224,8 @@ export default class Swiper extends PureComponent { setImmediate(() => { this.onScrollEnd({ nativeEvent: { - position: index - } + position: index, + }, }); }); } @@ -246,7 +246,7 @@ export default class Swiper extends PureComponent { render() { const { children, - width + width, } = this.props; const pages = React.Children.map(children, (page, i) => { @@ -277,17 +277,17 @@ const styles = StyleSheet.create({ container: { backgroundColor: 'transparent', position: 'relative', - flex: 1 + flex: 1, }, wrapperIOS: { - backgroundColor: 'transparent' + backgroundColor: 'transparent', }, wrapperAndroid: { backgroundColor: 'transparent', - flex: 1 + flex: 1, }, slide: { - backgroundColor: 'transparent' + backgroundColor: 'transparent', }, pagination: { position: 'absolute', @@ -299,7 +299,7 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', backgroundColor: 'transparent', - marginBottom: 13 + marginBottom: 13, }, dotStyle: { width: 8, @@ -308,6 +308,6 @@ const styles = StyleSheet.create({ marginLeft: 4, marginRight: 4, marginTop: 3, - marginBottom: 3 - } + marginBottom: 3, + }, }); diff --git a/app/components/text_input_with_localized_placeholder.js b/app/components/text_input_with_localized_placeholder.js index af64a21b8..d02a8a5c3 100644 --- a/app/components/text_input_with_localized_placeholder.js +++ b/app/components/text_input_with_localized_placeholder.js @@ -10,7 +10,7 @@ class TextInputWithLocalizedPlaceholder extends PureComponent { static propTypes = { ...TextInput.propTypes, placeholder: PropTypes.object.isRequired, - intl: intlShape.isRequired + intl: intlShape.isRequired, }; blur = () => { diff --git a/app/components/tooltip.js b/app/components/tooltip.js index b8174be18..ac5f6a0fb 100644 --- a/app/components/tooltip.js +++ b/app/components/tooltip.js @@ -10,7 +10,7 @@ import {setToolTipVisible} from 'app/utils/tooltip'; export default class ToolTip extends PureComponent { static propTypes = { onHide: PropTypes.func, - onShow: PropTypes.func + onShow: PropTypes.func, }; handleHide = () => { diff --git a/app/components/user_status/index.js b/app/components/user_status/index.js index 8aa725cea..cbc3f428b 100644 --- a/app/components/user_status/index.js +++ b/app/components/user_status/index.js @@ -16,7 +16,7 @@ function mapStateToProps(state, ownProps) { return { status, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/components/user_status/user_status.js b/app/components/user_status/user_status.js index e195800f4..6705b54ca 100644 --- a/app/components/user_status/user_status.js +++ b/app/components/user_status/user_status.js @@ -12,19 +12,19 @@ const statusToIcon = { away: AwayIcon, dnd: DndIcon, offline: OfflineIcon, - online: OnlineIcon + online: OnlineIcon, }; export default class UserStatus extends PureComponent { static propTypes = { size: PropTypes.number, status: PropTypes.string, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { size: 14, - status: General.OFFLINE + status: General.OFFLINE, }; render() { diff --git a/app/components/vector_icon.js b/app/components/vector_icon.js index f8cf18186..bc162fea7 100644 --- a/app/components/vector_icon.js +++ b/app/components/vector_icon.js @@ -14,11 +14,11 @@ export default class VectorIcon extends PureComponent { name: PropTypes.string, type: PropTypes.string, size: PropTypes.number, - style: Text.propTypes.style + style: Text.propTypes.style, }; static defaultProps = { - size: 14 + size: 14, }; render() { diff --git a/app/components/video_controls.js b/app/components/video_controls.js index 5fff97e1f..5bdd11f9e 100644 --- a/app/components/video_controls.js +++ b/app/components/video_controls.js @@ -13,7 +13,7 @@ import { TouchableWithoutFeedback, StyleSheet, Text, - View + View, } from 'react-native'; import Slider from 'react-native-slider'; @@ -25,7 +25,7 @@ import replayImage from 'assets/images/video_player/replay.png'; export const PLAYER_STATE = { PLAYING: 0, PAUSED: 1, - ENDED: 2 + ENDED: 2, }; export default class VideoControls extends PureComponent { @@ -40,19 +40,19 @@ export default class VideoControls extends PureComponent { onSeek: PropTypes.func, onSeeking: PropTypes.func, playerState: PropTypes.number, - progress: PropTypes.number + progress: PropTypes.number, }; static defaultProps = { duration: 0, - mainColor: 'rgba(12, 83, 175, 0.9)' + mainColor: 'rgba(12, 83, 175, 0.9)', }; constructor(props) { super(props); this.state = { opacity: new Animated.Value(1), - isVisible: true + isVisible: true, }; } @@ -254,16 +254,16 @@ const styles = StyleSheet.create({ top: 0, left: 0, bottom: 0, - right: 0 + right: 0, }, controlsRow: { flex: 1, alignItems: 'center', justifyContent: 'center', - alignSelf: 'stretch' + alignSelf: 'stretch', }, timeRow: { - alignSelf: 'stretch' + alignSelf: 'stretch', }, playButton: { justifyContent: 'center', @@ -272,54 +272,54 @@ const styles = StyleSheet.create({ height: 50, borderRadius: 3, borderWidth: 1.5, - borderColor: 'rgba(255,255,255,0.5)' + borderColor: 'rgba(255,255,255,0.5)', }, playIcon: { width: 22, height: 22, - resizeMode: 'contain' + resizeMode: 'contain', }, replayIcon: { width: 25, height: 20, - resizeMode: 'stretch' + resizeMode: 'stretch', }, progressContainer: { flexDirection: 'row', justifyContent: 'flex-end', - marginBottom: -25 + marginBottom: -25, }, progressColumnContainer: { - flex: 1 + flex: 1, }, fullScreenContainer: { alignSelf: 'stretch', alignItems: 'center', justifyContent: 'center', - paddingLeft: 20 + paddingLeft: 20, }, progressSlider: { - alignSelf: 'stretch' + alignSelf: 'stretch', }, timerLabelsContainer: { alignSelf: 'stretch', flexDirection: 'row', justifyContent: 'space-between', - marginBottom: -7 + marginBottom: -7, }, timerLabel: { fontSize: 12, - color: 'white' + color: 'white', }, track: { height: 5, - borderRadius: 1 + borderRadius: 1, }, thumb: { width: 20, height: 20, borderRadius: 50, backgroundColor: 'white', - borderWidth: 3 - } + borderWidth: 3, + }, }); diff --git a/app/constants/custom_prop_types.js b/app/constants/custom_prop_types.js index 7942a4539..b66ef7f95 100644 --- a/app/constants/custom_prop_types.js +++ b/app/constants/custom_prop_types.js @@ -8,10 +8,10 @@ export const Children = PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf([ export const Style = PropTypes.oneOfType([ PropTypes.object, // inline style PropTypes.number, // style sheet entry - PropTypes.array + PropTypes.array, ]); export default { Children, - Style + Style, }; diff --git a/app/constants/device.js b/app/constants/device.js index b03ecc93f..9f4ea7ef4 100644 --- a/app/constants/device.js +++ b/app/constants/device.js @@ -9,11 +9,11 @@ const deviceTypes = keyMirror({ DEVICE_DIMENSIONS_CHANGED: null, DEVICE_TYPE_CHANGED: null, DEVICE_ORIENTATION_CHANGED: null, - STATUSBAR_HEIGHT_CHANGED: null + STATUSBAR_HEIGHT_CHANGED: null, }); export default { ...deviceTypes, DOCUMENTS_PATH: `${RNFetchBlob.fs.dirs.CacheDir}/Documents`, - VIDEOS_PATH: `${RNFetchBlob.fs.dirs.CacheDir}/Videos` + VIDEOS_PATH: `${RNFetchBlob.fs.dirs.CacheDir}/Videos`, }; diff --git a/app/constants/index.js b/app/constants/index.js index c9b952ac5..db86062d1 100644 --- a/app/constants/index.js +++ b/app/constants/index.js @@ -12,5 +12,5 @@ export { ListTypes, NavigationTypes, PermissionTypes, - ViewTypes + ViewTypes, }; diff --git a/app/constants/list.js b/app/constants/list.js index 1d6638332..2e2146708 100644 --- a/app/constants/list.js +++ b/app/constants/list.js @@ -3,9 +3,9 @@ const VISIBILITY_CONFIG_DEFAULTS = { viewAreaCoveragePercentThreshold: 3, - waitForInteraction: false + waitForInteraction: false, }; export default { - VISIBILITY_CONFIG_DEFAULTS + VISIBILITY_CONFIG_DEFAULTS, }; \ No newline at end of file diff --git a/app/constants/navigation.js b/app/constants/navigation.js index eefe57a63..535240dd0 100644 --- a/app/constants/navigation.js +++ b/app/constants/navigation.js @@ -7,7 +7,7 @@ const NavigationTypes = keyMirror({ NAVIGATION_RESET: null, NAVIGATION_CLOSE_MODAL: null, NAVIGATION_NO_TEAMS: null, - RESTART_APP: null + RESTART_APP: null, }); export default NavigationTypes; diff --git a/app/constants/permissions.js b/app/constants/permissions.js index ba4aceee1..616eab79a 100644 --- a/app/constants/permissions.js +++ b/app/constants/permissions.js @@ -4,5 +4,5 @@ export default { AUTHORIZED: 'authorized', DENIED: 'denied', - UNDETERMINED: 'undetermined' + UNDETERMINED: 'undetermined', }; diff --git a/app/constants/view.js b/app/constants/view.js index 925a954aa..a4d91ddcb 100644 --- a/app/constants/view.js +++ b/app/constants/view.js @@ -6,7 +6,7 @@ import keyMirror from 'mattermost-redux/utils/key_mirror'; export const UpgradeTypes = { CAN_UPGRADE: 'can_upgrade', MUST_UPGRADE: 'must_upgrade', - NO_UPGRADE: 'no_upgrade' + NO_UPGRADE: 'no_upgrade', }; const ViewTypes = keyMirror({ @@ -64,7 +64,7 @@ const ViewTypes = keyMirror({ EXTENSION_SELECTED_TEAM_ID: null, ANNOUNCEMENT_BANNER: null, - INCREMENT_EMOJI_PICKER_PAGE: null + INCREMENT_EMOJI_PICKER_PAGE: null, }); export default { @@ -80,5 +80,5 @@ export default { IOS_TOP_LANDSCAPE: 32, IOS_TOP_PORTRAIT: 64, IOSX_TOP_PORTRAIT: 88, - STATUS_BAR_HEIGHT: 20 + STATUS_BAR_HEIGHT: 20, }; diff --git a/app/i18n/index.js b/app/i18n/index.js index 9289829ef..9539f5f88 100644 --- a/app/i18n/index.js +++ b/app/i18n/index.js @@ -48,7 +48,7 @@ const TRANSLATIONS = { tr, ru, 'zh-CN': zhCN, - 'zh-TW': zhTW + 'zh-TW': zhTW, }; addLocaleData(deLocaleData); diff --git a/app/initial_state.js b/app/initial_state.js index 2dbc20e40..52097725d 100644 --- a/app/initial_state.js +++ b/app/initial_state.js @@ -12,7 +12,7 @@ const state = { dataRetentionPolicy: {}, deviceToken: '', license: {}, - serverVersion: '' + serverVersion: '', }, users: { currentUserId: '', @@ -22,268 +22,268 @@ const state = { profilesInTeam: {}, profilesInChannel: {}, profilesNotInChannel: {}, - statuses: {} + statuses: {}, }, teams: { currentTeamId: '', teams: {}, myMembers: {}, membersInTeam: {}, - stats: {} + stats: {}, }, channels: { currentChannelId: '', channels: {}, myMembers: {}, - stats: {} + stats: {}, }, posts: { posts: {}, postsInChannel: {}, selectedPostId: '', - currentFocusedPostId: '' + currentFocusedPostId: '', }, preferences: { - myPreferences: {} + myPreferences: {}, }, search: { - recent: [] + recent: [], }, - typing: {} + typing: {}, }, errors: [], requests: { channels: { getChannel: { status: 'not_started', - error: null + error: null, }, getChannels: { status: 'not_started', - error: null + error: null, }, myMembers: { status: 'not_started', - error: null + error: null, }, createChannel: { status: 'not_started', - error: null + error: null, }, updateChannel: { status: 'not_started', - error: null + error: null, }, updateChannelNotifyProps: { status: 'not_started', - error: null + error: null, }, joinChannel: { status: 'not_started', - error: null + error: null, }, deleteChannel: { status: 'not_started', - error: null + error: null, }, updateLastViewedAt: { status: 'not_started', - error: null + error: null, }, getChannelStats: { status: 'not_started', - error: null + error: null, }, addChannelMember: { status: 'not_started', - error: null + error: null, }, removeChannelMember: { status: 'not_started', - error: null - } + error: null, + }, }, general: { server: { status: 'not_started', - error: null + error: null, }, config: { status: 'not_started', - error: null + error: null, }, dataRetentionPolicy: { status: 'not_started', - error: null + error: null, }, license: { status: 'not_started', - error: null + error: null, }, websocket: { status: 'not_started', - error: null - } + error: null, + }, }, posts: { createPost: { status: 'not_started', - error: null + error: null, }, editPost: { status: 'not_started', - error: null + error: null, }, deletePost: { status: 'not_started', - error: null + error: null, }, getPostThread: { status: 'not_started', - error: null + error: null, }, getPosts: { status: 'not_started', - error: null + error: null, }, getPostsSince: { status: 'not_started', - error: null + error: null, }, getPostsBefore: { status: 'not_started', - error: null + error: null, }, getPostsAfter: { status: 'not_started', - error: null - } + error: null, + }, }, teams: { getMyTeams: { status: 'not_started', - error: null + error: null, }, getTeams: { status: 'not_started', - error: null + error: null, }, createTeam: { status: 'not_started', - error: null + error: null, }, updateTeam: { status: 'not_started', - error: null + error: null, }, getMyTeamMembers: { status: 'not_started', - error: null + error: null, }, getTeamMembers: { status: 'not_started', - error: null + error: null, }, getTeamStats: { status: 'not_started', - error: null + error: null, }, addUserToTeam: { status: 'not_started', - error: null + error: null, }, removeUserFromTeam: { status: 'not_started', - error: null - } + error: null, + }, }, users: { login: { status: 'not_started', - error: null + error: null, }, logout: { status: 'not_started', - error: null + error: null, }, getProfiles: { status: 'not_started', - error: null + error: null, }, getProfilesInTeam: { status: 'not_started', - error: null + error: null, }, getProfilesInChannel: { status: 'not_started', - error: null + error: null, }, getProfilesNotInChannel: { status: 'not_started', - error: null + error: null, }, getStatusesByIds: { status: 'not_started', - error: null + error: null, }, getSessions: { status: 'not_started', - error: null + error: null, }, revokeSession: { status: 'not_started', - error: null + error: null, }, getAudits: { status: 'not_started', - error: null - } + error: null, + }, }, preferences: { getMyPreferences: { status: 'not_started', - error: null + error: null, }, savePreferences: { status: 'not_started', - error: null + error: null, }, deletePreferences: { status: 'not_started', - error: null - } - } + error: null, + }, + }, }, device: { - connection: true + connection: true, }, navigation: '', views: { channel: { - drafts: {} + drafts: {}, }, fetchCache: {}, i18n: { - locale: '' + locale: '', }, login: { loginId: '', - password: '' + password: '', }, root: { hydrationComplete: false, - purge: false + purge: false, }, selectServer: { - serverUrl: Config.DefaultServerUrl + serverUrl: Config.DefaultServerUrl, }, team: { - lastTeamId: '' + lastTeamId: '', }, thread: { - drafts: {} - } - } + drafts: {}, + }, + }, }; export default state; diff --git a/app/mattermost.js b/app/mattermost.js index 4eef5fc26..5bf3952b6 100644 --- a/app/mattermost.js +++ b/app/mattermost.js @@ -12,7 +12,7 @@ import { InteractionManager, Keyboard, NativeModules, - Platform + Platform, } from 'react-native'; import DeviceInfo from 'react-native-device-info'; import {setJSExceptionHandler, setNativeExceptionHandler} from 'react-native-exception-handler'; @@ -33,13 +33,13 @@ import { calculateDeviceDimensions, setDeviceOrientation, setDeviceAsTablet, - setStatusBarHeight + setStatusBarHeight, } from 'app/actions/device'; import { createPost, loadConfigAndLicense, loadFromPushNotification, - purgeOfflineStore + purgeOfflineStore, } from 'app/actions/views/root'; import {setChannelDisplayName} from 'app/actions/views/channel'; import {handleLoginIdChanged} from 'app/actions/views/login'; @@ -120,7 +120,7 @@ export default class Mattermost { onPress: () => { // purge the store this.store.dispatch(purgeOfflineStore()); - } + }, }], {cancelable: false} ); @@ -158,7 +158,7 @@ export default class Mattermost { onNotification: this.onPushNotification, onReply: this.onPushNotificationReply, popInitialNotification: true, - requestPermissions: true + requestPermissions: true, }); this.isConfigured = true; }; @@ -211,10 +211,10 @@ export default class Mattermost { await mattermostManaged.authenticate({ reason: intl.formatMessage({ id: 'mobile.managed.secured_by', - defaultMessage: 'Secured by {vendor}' + defaultMessage: 'Secured by {vendor}', }, {vendor}), fallbackToPasscode: true, - suppressEnterPassword: true + suppressEnterPassword: true, }); } catch (err) { mattermostManaged.quitApp(); @@ -238,7 +238,7 @@ export default class Mattermost { intl.formatMessage({id: 'mobile.server_upgrade.description', defaultMessage: '\nA server upgrade is required to use the Mattermost app. Please ask your System Administrator for details.\n'}), [{ text: intl.formatMessage({id: 'mobile.server_upgrade.button', defaultMessage: 'OK'}), - onPress: this.handleServerVersionUpgradeNeeded + onPress: this.handleServerVersionUpgradeNeeded, }], {cancelable: false} ); @@ -292,18 +292,18 @@ export default class Mattermost { Alert.alert( intl.formatMessage({ id: 'mobile.managed.blocked_by', - defaultMessage: 'Blocked by {vendor}' + defaultMessage: 'Blocked by {vendor}', }, {vendor}), intl.formatMessage({ id: 'mobile.managed.jailbreak', - defaultMessage: 'Jailbroken devices are not trusted by {vendor}, please exit the app.' + defaultMessage: 'Jailbroken devices are not trusted by {vendor}, please exit the app.', }, {vendor}), [{ text: intl.formatMessage({id: 'mobile.managed.exit', defaultMessage: 'Exit'}), style: 'destructive', onPress: () => { mattermostManaged.quitApp(); - } + }, }], {cancelable: false} ); @@ -482,7 +482,7 @@ export default class Mattermost { const {data, foreground, message, userInfo, userInteraction} = deviceNotification; const notification = { data, - message + message, }; if (userInfo) { @@ -525,7 +525,7 @@ export default class Mattermost { channel_id: data.channel_id, root_id: rootId, parent_id: rootId, - message: text + message: text, }; if (!Client4.getUrl()) { @@ -552,7 +552,7 @@ export default class Mattermost { data, text, badge, - completed + completed, }; } }; @@ -602,9 +602,9 @@ export default class Mattermost { navigatorStyle: { navBarHidden: true, statusBarHidden: false, - statusBarHideWithNavBar: false - } - } + statusBarHideWithNavBar: false, + }, + }, }); }; @@ -631,16 +631,16 @@ export default class Mattermost { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, - screenBackgroundColor: 'transparent' - } + screenBackgroundColor: 'transparent', + }, }, passProps: { - allowOtherServers: this.allowOtherServers + allowOtherServers: this.allowOtherServers, }, appStyle: { - orientation: 'auto' + orientation: 'auto', }, - animationType + animationType, }); this.appStarted = true; diff --git a/app/mattermost_bucket/index.js b/app/mattermost_bucket/index.js index 70da1d49c..a7c928c63 100644 --- a/app/mattermost_bucket/index.js +++ b/app/mattermost_bucket/index.js @@ -54,5 +54,5 @@ export default { if (MattermostBucket) { MattermostBucket.removeFile(fileName, groupName); } - } + }, }; diff --git a/app/mattermost_managed/mattermost-managed.android.js b/app/mattermost_managed/mattermost-managed.android.js index cda9f19a2..f103f58b9 100644 --- a/app/mattermost_managed/mattermost-managed.android.js +++ b/app/mattermost_managed/mattermost-managed.android.js @@ -62,5 +62,5 @@ export default { return JailMonkey.trustFall(); }, - quitApp: BackHandler.exitApp + quitApp: BackHandler.exitApp, }; diff --git a/app/mattermost_managed/mattermost-managed.ios.js b/app/mattermost_managed/mattermost-managed.ios.js index 7e7eb5b44..db515973a 100644 --- a/app/mattermost_managed/mattermost-managed.ios.js +++ b/app/mattermost_managed/mattermost-managed.ios.js @@ -61,5 +61,5 @@ export default { return JailMonkey.trustFall(); }, - quitApp: MattermostManaged.quitApp + quitApp: MattermostManaged.quitApp, }; diff --git a/app/notification_preferences/notification_preferences.android.js b/app/notification_preferences/notification_preferences.android.js index e5fd35538..dbb8811d1 100644 --- a/app/notification_preferences/notification_preferences.android.js +++ b/app/notification_preferences/notification_preferences.android.js @@ -8,7 +8,7 @@ const {NotificationPreferences} = NativeModules; const defaultPreferences = { sounds: [], shouldBlink: false, - shouldVibrate: true + shouldVibrate: true, }; export default { @@ -34,5 +34,5 @@ export default { setNotificationSound: NotificationPreferences.setNotificationSound, setShouldVibrate: NotificationPreferences.setShouldVibrate, setShouldBlink: NotificationPreferences.setShouldBlink, - play: NotificationPreferences.previewSound + play: NotificationPreferences.previewSound, }; diff --git a/app/notification_preferences/notification_preferences.ios.js b/app/notification_preferences/notification_preferences.ios.js index 748d7b1d7..d0f253e42 100644 --- a/app/notification_preferences/notification_preferences.ios.js +++ b/app/notification_preferences/notification_preferences.ios.js @@ -6,5 +6,5 @@ export default { setNotificationSound: () => null, setShouldVibrate: () => null, setShouldBlink: () => null, - play: () => null + play: () => null, }; diff --git a/app/push_notifications/push_notifications.android.js b/app/push_notifications/push_notifications.android.js index 459431c5e..0cc73a8b9 100644 --- a/app/push_notifications/push_notifications.android.js +++ b/app/push_notifications/push_notifications.android.js @@ -41,7 +41,7 @@ class PushNotification { this.deviceNotification = { data, text: data.text, - badge: parseInt(data.badge, 10) - parseInt(data.msg_count, 10) + badge: parseInt(data.badge, 10) - parseInt(data.msg_count, 10), }; } }); @@ -53,7 +53,7 @@ class PushNotification { foreground: !userInteraction && AppState.currentState === 'active', message: data.message, userInfo: data.userInfo, - userInteraction + userInteraction, }; if (this.onNotification) { diff --git a/app/push_notifications/push_notifications.ios.js b/app/push_notifications/push_notifications.ios.js index 6c21dcbbe..12c6d69df 100644 --- a/app/push_notifications/push_notifications.ios.js +++ b/app/push_notifications/push_notifications.ios.js @@ -19,7 +19,7 @@ class PushNotification { NotificationsIOS.addEventListener('notificationReceivedForeground', (notification) => { const info = { ...notification.getData(), - message: notification.getMessage() + message: notification.getMessage(), }; this.handleNotification(info, true, false); }); @@ -27,7 +27,7 @@ class PushNotification { NotificationsIOS.addEventListener('notificationReceivedBackground', (notification) => { const info = { ...notification.getData(), - message: notification.getMessage() + message: notification.getMessage(), }; this.handleNotification(info, false, false); }); @@ -35,7 +35,7 @@ class PushNotification { NotificationsIOS.addEventListener('notificationOpened', (notification) => { const info = { ...notification.getData(), - message: notification.getMessage() + message: notification.getMessage(), }; this.handleNotification(info, false, true); }); @@ -45,13 +45,13 @@ class PushNotification { title: 'Reply', behavior: 'textInput', authenticationRequired: true, - identifier: REPLY_ACTION + identifier: REPLY_ACTION, }, this.handleReply); replyCategory = new NotificationCategory({ identifier: CATEGORY, actions: [replyAction], - context: 'default' + context: 'default', }); } @@ -61,7 +61,7 @@ class PushNotification { foreground: foreground || (!userInteraction && AppState.currentState === 'active'), message: data.message, userInfo: data.userInfo, - userInteraction + userInteraction, }; if (this.onNotification) { @@ -114,7 +114,7 @@ class PushNotification { fireDate: notification.date.toISOString(), alertBody: notification.message, alertAction: '', - userInfo: notification.userInfo + userInfo: notification.userInfo, }; NotificationsIOS.localNotification(deviceNotification); diff --git a/app/reducers/app/index.js b/app/reducers/app/index.js index 52264ca07..8829b2fb0 100644 --- a/app/reducers/app/index.js +++ b/app/reducers/app/index.js @@ -8,5 +8,5 @@ import version from './version'; export default combineReducers({ build, - version + version, }); diff --git a/app/reducers/device/dimension.js b/app/reducers/device/dimension.js index 16b2b668a..fb44781ff 100644 --- a/app/reducers/device/dimension.js +++ b/app/reducers/device/dimension.js @@ -9,7 +9,7 @@ import {DeviceTypes} from 'app/constants'; const {height, width} = Dimensions.get('window'); const initialState = { deviceHeight: height, - deviceWidth: width + deviceWidth: width, }; export default function dimension(state = initialState, action) { diff --git a/app/reducers/device/index.js b/app/reducers/device/index.js index 9d256784e..ffd4a7692 100644 --- a/app/reducers/device/index.js +++ b/app/reducers/device/index.js @@ -16,5 +16,5 @@ export default combineReducers({ isTablet, orientation, statusBarHeight, - websocket + websocket, }); diff --git a/app/reducers/device/websocket.js b/app/reducers/device/websocket.js index a370afd60..d57548079 100644 --- a/app/reducers/device/websocket.js +++ b/app/reducers/device/websocket.js @@ -7,7 +7,7 @@ function getInitialState() { return { connected: false, lastConnectAt: 0, - lastDisconnectAt: 0 + lastDisconnectAt: 0, }; } @@ -16,13 +16,13 @@ export default function(state = getInitialState(), action) { return { ...state, connected: true, - lastConnectAt: new Date().getTime() + lastConnectAt: new Date().getTime(), }; } else if (state.connected && (action.type === GeneralTypes.WEBSOCKET_FAILURE || action.type === GeneralTypes.WEBSOCKET_CLOSED)) { return { ...state, connected: false, - lastDisconnectAt: new Date().getTime() + lastDisconnectAt: new Date().getTime(), }; } diff --git a/app/reducers/index.js b/app/reducers/index.js index 5c66152e1..74715ce9f 100644 --- a/app/reducers/index.js +++ b/app/reducers/index.js @@ -10,5 +10,5 @@ export default { app, device, navigation, - views + views, }; diff --git a/app/reducers/views/channel.js b/app/reducers/views/channel.js index 80caa5e60..a54c62ff4 100644 --- a/app/reducers/views/channel.js +++ b/app/reducers/views/channel.js @@ -5,7 +5,7 @@ import {combineReducers} from 'redux'; import { ChannelTypes, FileTypes, - PostTypes + PostTypes, } from 'mattermost-redux/action_types'; import {ViewTypes} from 'app/constants'; @@ -22,7 +22,7 @@ function displayName(state = '', action) { function handlePostDraftChanged(state, action) { return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {draft: action.draft}) + [action.channelId]: Object.assign({}, state[action.channelId], {draft: action.draft}), }; } @@ -30,8 +30,8 @@ function handlePostDraftSelectionChanged(state, action) { return { ...state, [action.channelId]: Object.assign({}, state[action.channelId], { - cursorPosition: action.cursorPosition - }) + cursorPosition: action.cursorPosition, + }), }; } @@ -41,8 +41,8 @@ function handleSetPostDraft(state, action) { [action.channelId]: { draft: action.draft, cursorPosition: 0, - files: action.files - } + files: action.files, + }, }; } @@ -54,8 +54,8 @@ function handleSelectChannel(state, action) { [action.data]: { draft: '', cursorPosition: 0, - files: [] - } + files: [], + }, }; } @@ -70,12 +70,12 @@ function handleSetTempUploadFileForPostDraft(state, action) { const tempFiles = action.clientIds.map((temp) => ({...temp, loading: true})); const files = [ ...state[action.channelId].files, - ...tempFiles + ...tempFiles, ]; return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {files}) + [action.channelId]: Object.assign({}, state[action.channelId], {files}), }; } @@ -89,7 +89,7 @@ function handleRetryUploadFileForPost(state, action) { return { ...f, loading: true, - failed: false + failed: false, }; } @@ -98,7 +98,7 @@ function handleRetryUploadFileForPost(state, action) { return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {files}) + [action.channelId]: Object.assign({}, state[action.channelId], {files}), }; } @@ -113,7 +113,7 @@ function handleReceivedUploadFiles(state, action) { if (file) { return { ...file, - localPath: tempFile.localPath + localPath: tempFile.localPath, }; } @@ -122,7 +122,7 @@ function handleReceivedUploadFiles(state, action) { return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {files}) + [action.channelId]: Object.assign({}, state[action.channelId], {files}), }; } @@ -137,7 +137,7 @@ function handleUploadFilesFailure(state, action) { return { ...tempFile, loading: false, - failed: true + failed: true, }; } @@ -146,7 +146,7 @@ function handleUploadFilesFailure(state, action) { return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {files}) + [action.channelId]: Object.assign({}, state[action.channelId], {files}), }; } @@ -157,7 +157,7 @@ function handleClearFilesForPostDraft(state, action) { return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {files: []}) + [action.channelId]: Object.assign({}, state[action.channelId], {files: []}), }; } @@ -170,7 +170,7 @@ function handleRemoveFileFromPostDraft(state, action) { return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {files}) + [action.channelId]: Object.assign({}, state[action.channelId], {files}), }; } @@ -184,7 +184,7 @@ function handleRemoveLastFileFromPostDraft(state, action) { return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {files}) + [action.channelId]: Object.assign({}, state[action.channelId], {files}), }; } @@ -196,7 +196,7 @@ function handleRemoveFailedFilesFromPostDraft(state, action) { const files = state[action.channelId].files.filter((f) => !f.failed); return { ...state, - [action.channelId]: Object.assign({}, state[action.channelId], {files}) + [action.channelId]: Object.assign({}, state[action.channelId], {files}), }; } @@ -305,7 +305,7 @@ function lastGetPosts(state = {}, action) { case ViewTypes.RECEIVED_POSTS_FOR_CHANNEL_AT_TIME: return { ...state, - [action.channelId]: action.time + [action.channelId]: action.time, }; default: @@ -332,5 +332,5 @@ export default combineReducers({ loadingPosts, lastGetPosts, retryFailed, - loadMorePostsVisible + loadMorePostsVisible, }); diff --git a/app/reducers/views/client_upgrade.js b/app/reducers/views/client_upgrade.js index c1759b3c9..ae7fab794 100644 --- a/app/reducers/views/client_upgrade.js +++ b/app/reducers/views/client_upgrade.js @@ -1,5 +1,5 @@ const initialState = { - lastUpdateCheck: 0 + lastUpdateCheck: 0, }; import {ViewTypes} from 'app/constants'; @@ -8,7 +8,7 @@ export default function clientUpgrade(state = initialState, action) { switch (action.type) { case ViewTypes.SET_LAST_UPGRADE_CHECK: return { - lastUpdateCheck: Date.now() + lastUpdateCheck: Date.now(), }; default: return state; diff --git a/app/reducers/views/emoji.js b/app/reducers/views/emoji.js index 17e5b93e2..ae9135c4a 100644 --- a/app/reducers/views/emoji.js +++ b/app/reducers/views/emoji.js @@ -18,6 +18,6 @@ function emojiPickerCustomPage(state = 0, action) { } export default combineReducers({ - emojiPickerCustomPage + emojiPickerCustomPage, }); diff --git a/app/reducers/views/extension.js b/app/reducers/views/extension.js index 09bca2b64..dd1221767 100644 --- a/app/reducers/views/extension.js +++ b/app/reducers/views/extension.js @@ -15,5 +15,5 @@ function selectedTeamId(state = '', action) { } export default combineReducers({ - selectedTeamId + selectedTeamId, }); diff --git a/app/reducers/views/fetch_cache.js b/app/reducers/views/fetch_cache.js index cc8f67042..393147827 100644 --- a/app/reducers/views/fetch_cache.js +++ b/app/reducers/views/fetch_cache.js @@ -8,7 +8,7 @@ export default function fetchCache(state = {}, action) { case ViewTypes.ADD_FILE_TO_FETCH_CACHE: return { ...state, - [action.url]: true + [action.url]: true, }; default: return state; diff --git a/app/reducers/views/i18n.js b/app/reducers/views/i18n.js index d5d66e9c2..f1c1964ce 100644 --- a/app/reducers/views/i18n.js +++ b/app/reducers/views/i18n.js @@ -22,5 +22,5 @@ function locale(state = defaultLocale, action) { } export default combineReducers({ - locale + locale, }); diff --git a/app/reducers/views/index.js b/app/reducers/views/index.js index 10146f083..431ebbd31 100644 --- a/app/reducers/views/index.js +++ b/app/reducers/views/index.js @@ -32,5 +32,5 @@ export default combineReducers({ selectServer, team, thread, - emoji + emoji, }); diff --git a/app/reducers/views/login.js b/app/reducers/views/login.js index 2e8e67330..d8b607358 100644 --- a/app/reducers/views/login.js +++ b/app/reducers/views/login.js @@ -29,5 +29,5 @@ function password(state = '', action) { export default combineReducers({ loginId, - password + password, }); diff --git a/app/reducers/views/root.js b/app/reducers/views/root.js index 562f3c049..1dd0b5566 100644 --- a/app/reducers/views/root.js +++ b/app/reducers/views/root.js @@ -25,5 +25,5 @@ function purge(state = false, action) { export default combineReducers({ hydrationComplete, - purge + purge, }); diff --git a/app/reducers/views/select_server.js b/app/reducers/views/select_server.js index 95b6f90b8..d613864bf 100644 --- a/app/reducers/views/select_server.js +++ b/app/reducers/views/select_server.js @@ -18,5 +18,5 @@ function serverUrl(state = Config.DefaultServerUrl, action) { } export default combineReducers({ - serverUrl + serverUrl, }); diff --git a/app/reducers/views/team.js b/app/reducers/views/team.js index 12c4a03ec..47f0ff97a 100644 --- a/app/reducers/views/team.js +++ b/app/reducers/views/team.js @@ -41,7 +41,7 @@ function lastChannelForTeam(state = {}, action) { return { ...state, - [action.teamId]: channelIds + [action.teamId]: channelIds, }; } default: @@ -51,5 +51,5 @@ function lastChannelForTeam(state = {}, action) { export default combineReducers({ lastTeamId, - lastChannelForTeam + lastChannelForTeam, }); diff --git a/app/reducers/views/thread.js b/app/reducers/views/thread.js index bb372422b..d71a9ad62 100644 --- a/app/reducers/views/thread.js +++ b/app/reducers/views/thread.js @@ -13,7 +13,7 @@ function handleCommentDraftChanged(state, action) { return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {draft: action.draft}) + [action.rootId]: Object.assign({}, state[action.rootId], {draft: action.draft}), }; } @@ -27,8 +27,8 @@ function handleSetCommentDraft(state, action) { [action.rootId]: { draft: action.draft, cursorPosition: 0, - files: action.files - } + files: action.files, + }, }; } @@ -40,8 +40,8 @@ function handleCommentDraftSelectionChange(state, action) { return { ...state, [action.rootId]: Object.assign({}, state[action.rootId], { - cursorPosition: action.cursorPosition - }) + cursorPosition: action.cursorPosition, + }), }; } @@ -58,8 +58,8 @@ function handleReceivedPostSelected(state, action) { [action.data]: { draft: '', cursorPosition: 0, - files: [] - } + files: [], + }, }; } @@ -74,12 +74,12 @@ function handleSetTempUploadFilesForPostDraft(state, action) { const tempFiles = action.clientIds.map((temp) => ({...temp, loading: true})); const files = [ ...state[action.rootId].files, - ...tempFiles + ...tempFiles, ]; return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {files}) + [action.rootId]: Object.assign({}, state[action.rootId], {files}), }; } @@ -93,7 +93,7 @@ function handleRetryUploadForPost(state, action) { return { ...f, loading: true, - failed: false + failed: false, }; } @@ -102,7 +102,7 @@ function handleRetryUploadForPost(state, action) { return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {files}) + [action.rootId]: Object.assign({}, state[action.rootId], {files}), }; } @@ -117,7 +117,7 @@ function handleReceiveUploadFiles(state, action) { if (file) { return { ...file, - localPath: tempFile.localPath + localPath: tempFile.localPath, }; } @@ -126,7 +126,7 @@ function handleReceiveUploadFiles(state, action) { return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {files}) + [action.rootId]: Object.assign({}, state[action.rootId], {files}), }; } @@ -141,7 +141,7 @@ function handleUploadFilesFailure(state, action) { return { ...tempFile, loading: false, - failed: true + failed: true, }; } @@ -150,7 +150,7 @@ function handleUploadFilesFailure(state, action) { return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {files}) + [action.rootId]: Object.assign({}, state[action.rootId], {files}), }; } @@ -161,7 +161,7 @@ function handleClearFilesForPostDraft(state, action) { return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {files: []}) + [action.rootId]: Object.assign({}, state[action.rootId], {files: []}), }; } @@ -174,7 +174,7 @@ function handleRemoveFileFromPostDraft(state, action) { return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {files}) + [action.rootId]: Object.assign({}, state[action.rootId], {files}), }; } @@ -188,7 +188,7 @@ function handleRemoveLastFromPostDraft(state, action) { return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {files}) + [action.rootId]: Object.assign({}, state[action.rootId], {files}), }; } @@ -200,7 +200,7 @@ function handleRemoveFailedFilesFromPostDraft(state, action) { const files = state[action.rootId].files.filter((f) => !f.failed); return { ...state, - [action.rootId]: Object.assign({}, state[action.rootId], {files}) + [action.rootId]: Object.assign({}, state[action.rootId], {files}), }; } @@ -236,5 +236,5 @@ function drafts(state = {}, action) { // eslint-disable-line complexity } export default combineReducers({ - drafts + drafts, }); diff --git a/app/screens/about/about.js b/app/screens/about/about.js index 392b676de..efd08c45d 100644 --- a/app/screens/about/about.js +++ b/app/screens/about/about.js @@ -8,7 +8,7 @@ import { ScrollView, Text, TouchableOpacity, - View + View, } from 'react-native'; import DeviceInfo from 'react-native-device-info'; @@ -26,7 +26,7 @@ export default class About extends PureComponent { config: PropTypes.object.isRequired, license: PropTypes.object.isRequired, navigator: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; componentWillReceiveProps(nextProps) { @@ -139,7 +139,7 @@ export default class About extends PureComponent { defaultMessage='Licensed to: {company}' style={style.info} values={{ - company: license.Company + company: license.Company, }} /> @@ -155,7 +155,7 @@ export default class About extends PureComponent { defaultMessage='Server Version: {version}' style={style.info} values={{ - version: config.Version + version: config.Version, }} /> ); @@ -167,7 +167,7 @@ export default class About extends PureComponent { style={style.info} values={{ version: config.Version, - number: config.BuildNumber + number: config.BuildNumber, }} /> ); @@ -201,7 +201,7 @@ export default class About extends PureComponent { style={style.info} values={{ version: DeviceInfo.getVersion(), - number: DeviceInfo.getBuildNumber() + number: DeviceInfo.getBuildNumber(), }} /> {serverVersion} @@ -210,7 +210,7 @@ export default class About extends PureComponent { defaultMessage='Database: {type}' style={style.info} values={{ - type: config.SQLDriverName + type: config.SQLDriverName, }} /> {licensee} @@ -221,7 +221,7 @@ export default class About extends PureComponent { defaultMessage='{site} is powered by Mattermost' style={style.footerText} values={{ - site: this.props.config.SiteName + site: this.props.config.SiteName, }} /> } @@ -230,7 +230,7 @@ export default class About extends PureComponent { defaultMessage='Copyright 2015-{currentYear} Mattermost, Inc. All rights reserved' style={style.footerText} values={{ - currentYear: new Date().getFullYear() + currentYear: new Date().getFullYear(), }} /> @@ -255,7 +255,7 @@ export default class About extends PureComponent { style={[style.noticeLink, {marginLeft: 5}]} onPress={this.handleMobileNotice} /> - ) + ), }} /> @@ -303,85 +303,85 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { wrapper: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.06) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), }, scrollViewContent: { - paddingBottom: 30 + paddingBottom: 30, }, logoContainer: { alignItems: 'center', flex: 1, height: 200, - paddingVertical: 40 + paddingVertical: 40, }, infoContainer: { flex: 1, flexDirection: 'column', - paddingHorizontal: 20 + paddingHorizontal: 20, }, titleContainer: { flex: 1, flexDirection: 'row', - marginBottom: 20 + marginBottom: 20, }, title: { fontSize: 22, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, subtitle: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 19, - marginBottom: 15 + marginBottom: 15, }, learnContainer: { flex: 1, flexDirection: 'column', - marginVertical: 20 + marginVertical: 20, }, learn: { color: theme.centerChannelColor, - fontSize: 16 + fontSize: 16, }, learnLink: { color: theme.linkColor, - fontSize: 16 + fontSize: 16, }, info: { color: theme.centerChannelColor, fontSize: 16, - lineHeight: 19 + lineHeight: 19, }, licenseContainer: { flex: 1, flexDirection: 'row', - marginTop: 20 + marginTop: 20, }, noticeContainer: { flex: 1, - flexDirection: 'column' + flexDirection: 'column', }, noticeLink: { color: theme.linkColor, fontSize: 11, - lineHeight: 13 + lineHeight: 13, }, hashContainer: { flex: 1, - flexDirection: 'column' + flexDirection: 'column', }, footerGroup: { flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, footerText: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 11, lineHeight: 13, - marginBottom: 10 - } + marginBottom: 10, + }, }; }); diff --git a/app/screens/about/index.js b/app/screens/about/index.js index 4eccffbf5..42d35ee4e 100644 --- a/app/screens/about/index.js +++ b/app/screens/about/index.js @@ -13,7 +13,7 @@ function mapStateToProps(state) { return { config, license, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/add_reaction/add_reaction.js b/app/screens/add_reaction/add_reaction.js index 5a8e8d0d7..617cc718a 100644 --- a/app/screens/add_reaction/add_reaction.js +++ b/app/screens/add_reaction/add_reaction.js @@ -5,7 +5,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { StyleSheet, - View + View, } from 'react-native'; import EmojiPicker from 'app/components/emoji_picker'; @@ -17,15 +17,15 @@ export default class AddReaction extends PureComponent { closeButton: PropTypes.object, navigator: PropTypes.object.isRequired, onEmojiPress: PropTypes.func, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - onEmojiPress: emptyFunction + onEmojiPress: emptyFunction, }; leftButton = { - id: 'close-edit-post' + id: 'close-edit-post', }; constructor(props) { @@ -33,7 +33,7 @@ export default class AddReaction extends PureComponent { props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); props.navigator.setButtons({ - leftButtons: [{...this.leftButton, icon: props.closeButton}] + leftButtons: [{...this.leftButton, icon: props.closeButton}], }); } @@ -45,7 +45,7 @@ export default class AddReaction extends PureComponent { close = () => { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); }; @@ -75,6 +75,6 @@ export default class AddReaction extends PureComponent { const styles = StyleSheet.create({ container: { - flex: 1 - } + flex: 1, + }, }); diff --git a/app/screens/add_reaction/index.js b/app/screens/add_reaction/index.js index ffb715123..c610c1ffc 100644 --- a/app/screens/add_reaction/index.js +++ b/app/screens/add_reaction/index.js @@ -9,7 +9,7 @@ import AddReaction from './add_reaction'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/channel/channel.js b/app/screens/channel/channel.js index 556fa9352..891a91de1 100644 --- a/app/screens/channel/channel.js +++ b/app/screens/channel/channel.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {injectIntl, intlShape} from 'react-intl'; import { Platform, - View + View, } from 'react-native'; import EventEmitter from 'mattermost-redux/utils/event_emitter'; @@ -43,14 +43,14 @@ class Channel extends PureComponent { closeWebSocket: PropTypes.func.isRequired, recordLoadTime: PropTypes.func.isRequired, startPeriodicStatusUpdates: PropTypes.func.isRequired, - stopPeriodicStatusUpdates: PropTypes.func.isRequired + stopPeriodicStatusUpdates: PropTypes.func.isRequired, }).isRequired, currentChannelId: PropTypes.string, channelsRequestFailed: PropTypes.bool, currentTeamId: PropTypes.string, intl: intlShape.isRequired, navigator: PropTypes.object, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; componentWillMount() { @@ -74,7 +74,7 @@ class Channel extends PureComponent { componentWillReceiveProps(nextProps) { if (this.props.theme !== nextProps.theme) { this.props.navigator.setStyle({ - screenBackgroundColor: nextProps.theme.centerChannelBg + screenBackgroundColor: nextProps.theme.centerChannelBg, }); } @@ -130,8 +130,8 @@ class Channel extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }; if (Platform.OS === 'android') { @@ -148,7 +148,7 @@ class Channel extends PureComponent { connection, initWebSocket, startPeriodicStatusUpdates, - stopPeriodicStatusUpdates + stopPeriodicStatusUpdates, } = actions; if (isConnected) { @@ -169,7 +169,7 @@ class Channel extends PureComponent { const { loadChannelsIfNecessary, loadProfilesAndTeamMembersForDMSidebar, - selectInitialChannel + selectInitialChannel, } = this.props.actions; loadChannelsIfNecessary(teamId).then(() => { @@ -202,7 +202,7 @@ class Channel extends PureComponent { currentChannelId, intl, navigator, - theme + theme, } = this.props; const style = getStyleFromTheme(theme); @@ -265,12 +265,12 @@ class Channel extends PureComponent { const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { postList: { - flex: 1 + flex: 1, }, loading: { backgroundColor: theme.centerChannelBg, - flex: 1 - } + flex: 1, + }, }; }); diff --git a/app/screens/channel/channel_nav_bar/channel_drawer_button.js b/app/screens/channel/channel_nav_bar/channel_drawer_button.js index 64dbd727c..6535cc6f8 100644 --- a/app/screens/channel/channel_nav_bar/channel_drawer_button.js +++ b/app/screens/channel/channel_nav_bar/channel_drawer_button.js @@ -8,7 +8,7 @@ import { PanResponder, Platform, TouchableOpacity, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; @@ -30,21 +30,21 @@ class ChannelDrawerButton extends PureComponent { messageCount: PropTypes.number, mentionCount: PropTypes.number, myTeamMembers: PropTypes.object, - theme: PropTypes.object + theme: PropTypes.object, }; static defaultProps = { currentChannel: {}, theme: {}, messageCount: 0, - mentionCount: 0 + mentionCount: 0, }; constructor(props) { super(props); this.state = { - opacity: 1 + opacity: 1, }; } @@ -54,7 +54,7 @@ class ChannelDrawerButton extends PureComponent { onMoveShouldSetPanResponder: () => true, onStartShouldSetResponderCapture: () => true, onMoveShouldSetResponderCapture: () => true, - onResponderMove: () => false + onResponderMove: () => false, }); } @@ -85,7 +85,7 @@ class ChannelDrawerButton extends PureComponent { mentionCount, messageCount, myTeamMembers, - theme + theme, } = this.props; const style = getStyleFromTheme(theme); @@ -145,14 +145,14 @@ class ChannelDrawerButton extends PureComponent { const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { - width: 55 + width: 55, }, wrapper: { alignItems: 'center', flex: 1, flexDirection: 'column', justifyContent: 'center', - paddingHorizontal: 10 + paddingHorizontal: 10, }, badge: { backgroundColor: theme.mentionBj, @@ -166,17 +166,17 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { right: 0, ...Platform.select({ android: { - top: 10 + top: 10, }, ios: { - top: 5 - } - }) + top: 5, + }, + }), }, mention: { color: theme.mentionColor, - fontSize: 10 - } + fontSize: 10, + }, }; }); @@ -185,7 +185,7 @@ function mapStateToProps(state) { currentTeamId: getCurrentTeamId(state), myTeamMembers: getTeamMemberships(state), theme: getTheme(state), - ...getUnreadsInCurrentTeam(state) + ...getUnreadsInCurrentTeam(state), }; } diff --git a/app/screens/channel/channel_nav_bar/channel_nav_bar.js b/app/screens/channel/channel_nav_bar/channel_nav_bar.js index f8199d752..4e68977bc 100644 --- a/app/screens/channel/channel_nav_bar/channel_nav_bar.js +++ b/app/screens/channel/channel_nav_bar/channel_nav_bar.js @@ -19,7 +19,7 @@ const { ANDROID_TOP_PORTRAIT, IOS_TOP_LANDSCAPE, IOS_TOP_PORTRAIT, - STATUS_BAR_HEIGHT + STATUS_BAR_HEIGHT, } = ViewTypes; export default class ChannelNavBar extends PureComponent { @@ -29,7 +29,7 @@ export default class ChannelNavBar extends PureComponent { openChannelDrawer: PropTypes.func.isRequired, openSettingsDrawer: PropTypes.func.isRequired, onPress: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; constructor(props) { @@ -85,7 +85,7 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { flexDirection: 'row', justifyContent: 'flex-start', width: '100%', - zIndex: 10 - } + zIndex: 10, + }, }; }); diff --git a/app/screens/channel/channel_nav_bar/channel_search_button/channel_search_button.js b/app/screens/channel/channel_nav_bar/channel_search_button/channel_search_button.js index d789a3b6c..55db53b6b 100644 --- a/app/screens/channel/channel_nav_bar/channel_search_button/channel_search_button.js +++ b/app/screens/channel/channel_nav_bar/channel_search_button/channel_search_button.js @@ -8,7 +8,7 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import { TouchableOpacity, - View + View, } from 'react-native'; import AwesomeIcon from 'react-native-vector-icons/FontAwesome'; @@ -21,10 +21,10 @@ export default class ChannelSearchButton extends PureComponent { static propTypes = { actions: PropTypes.shape({ clearSearch: PropTypes.func.isRequired, - handlePostDraftChanged: PropTypes.func.isRequired + handlePostDraftChanged: PropTypes.func.isRequired, }).isRequired, navigator: PropTypes.object, - theme: PropTypes.object + theme: PropTypes.object, }; handlePress = wrapWithPreventDoubleTap(async () => { @@ -40,14 +40,14 @@ export default class ChannelSearchButton extends PureComponent { overrideBackPress: true, navigatorStyle: { navBarHidden: true, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); render() { const { - theme + theme, } = this.props; const style = getStyle(theme); @@ -74,10 +74,10 @@ export default class ChannelSearchButton extends PureComponent { const getStyle = makeStyleSheetFromTheme((theme) => { return { container: { - width: 40 + width: 40, }, flex: { - flex: 1 + flex: 1, }, wrapper: { position: 'relative', @@ -85,11 +85,11 @@ const getStyle = makeStyleSheetFromTheme((theme) => { alignItems: 'flex-end', flex: 1, flexDirection: 'column', - justifyContent: 'center' + justifyContent: 'center', }, icon: { backgroundColor: theme.sidebarHeaderBg, - color: theme.sidebarHeaderTextColor - } + color: theme.sidebarHeaderTextColor, + }, }; }); diff --git a/app/screens/channel/channel_nav_bar/channel_search_button/index.js b/app/screens/channel/channel_nav_bar/channel_search_button/index.js index 7e8c1033e..b5d500e9a 100644 --- a/app/screens/channel/channel_nav_bar/channel_search_button/index.js +++ b/app/screens/channel/channel_nav_bar/channel_search_button/index.js @@ -14,8 +14,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ clearSearch, - handlePostDraftChanged - }, dispatch) + handlePostDraftChanged, + }, dispatch), }; } diff --git a/app/screens/channel/channel_nav_bar/channel_title/channel_title.js b/app/screens/channel/channel_nav_bar/channel_title/channel_title.js index 17f6a73de..6990dabdf 100644 --- a/app/screens/channel/channel_nav_bar/channel_title/channel_title.js +++ b/app/screens/channel/channel_nav_bar/channel_title/channel_title.js @@ -7,7 +7,7 @@ import PropTypes from 'prop-types'; import { Text, TouchableOpacity, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -18,13 +18,13 @@ export default class ChannelTitle extends PureComponent { currentChannelName: PropTypes.string, displayName: PropTypes.string, onPress: PropTypes.func, - theme: PropTypes.object + theme: PropTypes.object, }; static defaultProps = { currentChannel: {}, displayName: null, - theme: {} + theme: {}, }; render() { @@ -65,7 +65,7 @@ export default class ChannelTitle extends PureComponent { const getStyle = makeStyleSheetFromTheme((theme) => { return { container: { - flex: 1 + flex: 1, }, wrapper: { alignItems: 'center', @@ -73,17 +73,17 @@ const getStyle = makeStyleSheetFromTheme((theme) => { position: 'relative', top: -1, flexDirection: 'row', - justifyContent: 'flex-start' + justifyContent: 'flex-start', }, icon: { color: theme.sidebarHeaderTextColor, - marginHorizontal: 5 + marginHorizontal: 5, }, text: { color: theme.sidebarHeaderTextColor, fontSize: 18, fontWeight: 'bold', - textAlign: 'center' - } + textAlign: 'center', + }, }; }); diff --git a/app/screens/channel/channel_nav_bar/channel_title/index.js b/app/screens/channel/channel_nav_bar/channel_title/index.js index d5655d1ed..27b2c0a70 100644 --- a/app/screens/channel/channel_nav_bar/channel_title/index.js +++ b/app/screens/channel/channel_nav_bar/channel_title/index.js @@ -14,7 +14,7 @@ function mapStateToProps(state) { return { currentChannelName: currentChannel ? currentChannel.display_name : '', displayName: state.views.channel.displayName, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/channel/channel_nav_bar/index.js b/app/screens/channel/channel_nav_bar/index.js index 769f1e88c..43a08c843 100644 --- a/app/screens/channel/channel_nav_bar/index.js +++ b/app/screens/channel/channel_nav_bar/index.js @@ -11,7 +11,7 @@ import ChannelNavBar from './channel_nav_bar'; function mapStateToProps(state) { return { isLandscape: isLandscape(state), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/channel/channel_nav_bar/settings_drawer_button.js b/app/screens/channel/channel_nav_bar/settings_drawer_button.js index d550ce605..aea0b9c90 100644 --- a/app/screens/channel/channel_nav_bar/settings_drawer_button.js +++ b/app/screens/channel/channel_nav_bar/settings_drawer_button.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {connect} from 'react-redux'; import { TouchableOpacity, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; @@ -18,11 +18,11 @@ import {makeStyleSheetFromTheme} from 'app/utils/theme'; class SettingDrawerButton extends PureComponent { static propTypes = { openDrawer: PropTypes.func.isRequired, - theme: PropTypes.object + theme: PropTypes.object, }; static defaultProps = { - theme: {} + theme: {}, }; handlePress = wrapWithPreventDoubleTap(() => { @@ -57,25 +57,25 @@ class SettingDrawerButton extends PureComponent { const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { - width: 44 + width: 44, }, wrapper: { alignItems: 'center', flex: 1, flexDirection: 'column', justifyContent: 'center', - marginLeft: 8 + marginLeft: 8, }, mention: { color: theme.mentionColor, - fontSize: 10 - } + fontSize: 10, + }, }; }); function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/channel/channel_post_list/channel_post_list.js b/app/screens/channel/channel_post_list/channel_post_list.js index f6b33cc0c..fe13f17da 100644 --- a/app/screens/channel/channel_post_list/channel_post_list.js +++ b/app/screens/channel/channel_post_list/channel_post_list.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Platform, StyleSheet, - View + View, } from 'react-native'; import AnnouncementBanner from 'app/components/announcement_banner'; @@ -23,7 +23,7 @@ export default class ChannelPostList extends PureComponent { increasePostVisibility: PropTypes.func.isRequired, selectPost: PropTypes.func.isRequired, recordLoadTime: PropTypes.func.isRequired, - refreshChannelWithRetry: PropTypes.func.isRequired + refreshChannelWithRetry: PropTypes.func.isRequired, }).isRequired, channelId: PropTypes.string.isRequired, channelRefreshingFailed: PropTypes.bool, @@ -33,18 +33,18 @@ export default class ChannelPostList extends PureComponent { navigator: PropTypes.object, postIds: PropTypes.array.isRequired, postVisibility: PropTypes.number, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - postVisibility: 15 + postVisibility: 15, }; constructor(props) { super(props); this.state = { - visiblePostIds: this.getVisiblePostIds(props) + visiblePostIds: this.getVisiblePostIds(props), }; } @@ -58,7 +58,7 @@ export default class ChannelPostList extends PureComponent { } this.setState({ - visiblePostIds + visiblePostIds, }); } @@ -87,12 +87,12 @@ export default class ChannelPostList extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { channelId, - rootId - } + rootId, + }, }; if (Platform.OS === 'android') { @@ -124,11 +124,11 @@ export default class ChannelPostList extends PureComponent { loadMorePostsVisible, navigator, postIds, - theme + theme, } = this.props; const { - visiblePostIds + visiblePostIds, } = this.state; let component; @@ -169,6 +169,6 @@ export default class ChannelPostList extends PureComponent { const style = StyleSheet.create({ container: { - flex: 1 - } + flex: 1, + }, }); diff --git a/app/screens/channel/channel_post_list/index.js b/app/screens/channel/channel_post_list/index.js index 401d1b63f..4854f7f41 100644 --- a/app/screens/channel/channel_post_list/index.js +++ b/app/screens/channel/channel_post_list/index.js @@ -27,7 +27,7 @@ function mapStateToProps(state) { postVisibility: state.views.channel.postVisibility[channelId], lastViewedAt: getMyCurrentChannelMembership(state).last_viewed_at, loadMorePostsVisible: state.views.channel.loadMorePostsVisible, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -39,8 +39,8 @@ function mapDispatchToProps(dispatch) { increasePostVisibility, selectPost, recordLoadTime, - refreshChannelWithRetry - }, dispatch) + refreshChannelWithRetry, + }, dispatch), }; } diff --git a/app/screens/channel/index.js b/app/screens/channel/index.js index 50fa3ff70..5241fdc07 100644 --- a/app/screens/channel/index.js +++ b/app/screens/channel/index.js @@ -13,7 +13,7 @@ import {getCurrentTeamId} from 'mattermost-redux/selectors/entities/teams'; import { loadChannelsIfNecessary, loadProfilesAndTeamMembersForDMSidebar, - selectInitialChannel + selectInitialChannel, } from 'app/actions/views/channel'; import {connection} from 'app/actions/device'; import {recordLoadTime} from 'app/actions/views/root'; @@ -29,7 +29,7 @@ function mapStateToProps(state) { channelsRequestFailed: channelsRequest.status === RequestStatus.FAILURE, currentTeamId: getCurrentTeamId(state), currentChannelId: getCurrentChannelId(state), - theme: getTheme(state) + theme: getTheme(state), }; } @@ -45,8 +45,8 @@ function mapDispatchToProps(dispatch) { closeWebSocket, recordLoadTime, startPeriodicStatusUpdates, - stopPeriodicStatusUpdates - }, dispatch) + stopPeriodicStatusUpdates, + }, dispatch), }; } diff --git a/app/screens/channel_add_members/channel_add_members.js b/app/screens/channel_add_members/channel_add_members.js index 56dee34e3..4bd531d54 100644 --- a/app/screens/channel_add_members/channel_add_members.js +++ b/app/screens/channel_add_members/channel_add_members.js @@ -8,7 +8,7 @@ import { Alert, InteractionManager, Platform, - View + View, } from 'react-native'; import Loading from 'app/components/loading'; @@ -39,14 +39,14 @@ class ChannelAddMembers extends PureComponent { getTeamStats: PropTypes.func.isRequired, getProfilesNotInChannel: PropTypes.func.isRequired, handleAddChannelMembers: PropTypes.func.isRequired, - searchProfiles: PropTypes.func.isRequired - }) + searchProfiles: PropTypes.func.isRequired, + }), }; addButton = { disabled: true, id: 'add-members', - showAsAction: 'always' + showAsAction: 'always', }; constructor(props) { @@ -62,13 +62,13 @@ class ChannelAddMembers extends PureComponent { searching: false, selectedMembers: {}, showNoResults: false, - term: '' + term: '', }; this.addButton.title = props.intl.formatMessage({id: 'integrations.add', defaultMessage: 'Add'}); props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); props.navigator.setButtons({ - rightButtons: [this.addButton] + rightButtons: [this.addButton], }); } @@ -130,7 +130,7 @@ class ChannelAddMembers extends PureComponent { searching: false, term: '', page: 0, - profiles: markSelectedProfiles(this.props.membersNotInChannel, this.state.selectedMembers) + profiles: markSelectedProfiles(this.props.membersNotInChannel, this.state.selectedMembers), }); }; @@ -140,13 +140,13 @@ class ChannelAddMembers extends PureComponent { emitAdding = (loading) => { this.props.navigator.setButtons({ - rightButtons: [{...this.addButton, disabled: loading}] + rightButtons: [{...this.addButton, disabled: loading}], }); }; emitCanAddMembers = (enabled) => { this.props.navigator.setButtons({ - rightButtons: [{...this.addButton, disabled: !enabled}] + rightButtons: [{...this.addButton, disabled: !enabled}], }); }; @@ -175,7 +175,7 @@ class ChannelAddMembers extends PureComponent { } this.setState({ profiles: markSelectedProfiles(this.state.profiles, selectedMembers), - selectedMembers + selectedMembers, }); }; @@ -188,7 +188,7 @@ class ChannelAddMembers extends PureComponent { actions.getProfilesNotInChannel(currentTeam.id, currentChannel.id, page, General.PROFILE_CHUNK_SIZE).then(({data}) => { if (data && data.length) { this.setState({ - page + page, }); } else { this.setState({next: false}); @@ -245,9 +245,9 @@ class ChannelAddMembers extends PureComponent { fontSize: 15, ...Platform.select({ android: { - marginBottom: -5 - } - }) + marginBottom: -5, + }, + }), }; return ( @@ -296,8 +296,8 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg - } + backgroundColor: theme.centerChannelBg, + }, }; }); diff --git a/app/screens/channel_add_members/index.js b/app/screens/channel_add_members/index.js index fb06dc4a9..80074d121 100644 --- a/app/screens/channel_add_members/index.js +++ b/app/screens/channel_add_members/index.js @@ -24,7 +24,7 @@ function mapStateToProps(state) { loadMoreRequestStatus: state.requests.users.getProfilesNotInChannel.status, addChannelMemberRequestStatus: state.requests.channels.addChannelMember, searchRequestStatus: state.requests.users.searchProfiles.status, - addChannelMemberStatus: state.requests.channels.addChannelMember.status + addChannelMemberStatus: state.requests.channels.addChannelMember.status, }; } @@ -34,8 +34,8 @@ function mapDispatchToProps(dispatch) { getTeamStats, getProfilesNotInChannel, handleAddChannelMembers, - searchProfiles - }, dispatch) + searchProfiles, + }, dispatch), }; } diff --git a/app/screens/channel_info/channel_info.js b/app/screens/channel_info/channel_info.js index b25e8fee8..93de3b18d 100644 --- a/app/screens/channel_info/channel_info.js +++ b/app/screens/channel_info/channel_info.js @@ -8,7 +8,7 @@ import { Alert, Platform, ScrollView, - View + View, } from 'react-native'; import StatusBar from 'app/components/status_bar'; @@ -44,15 +44,15 @@ class ChannelInfo extends PureComponent { leaveChannel: PropTypes.func.isRequired, favoriteChannel: PropTypes.func.isRequired, unfavoriteChannel: PropTypes.func.isRequired, - getCustomEmojisInText: PropTypes.func.isRequired - }) + getCustomEmojisInText: PropTypes.func.isRequired, + }), }; constructor(props) { super(props); this.state = { - isFavorite: this.props.isFavorite + isFavorite: this.props.isFavorite, }; } @@ -92,8 +92,8 @@ class ChannelInfo extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); @@ -111,8 +111,8 @@ class ChannelInfo extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); @@ -130,8 +130,8 @@ class ChannelInfo extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); @@ -156,7 +156,7 @@ class ChannelInfo extends PureComponent { title = {id: 'mobile.channel_info.alertTitleLeaveChannel', defaultMessage: 'Leave {term}'}; message = { id: 'mobile.channel_info.alertMessageLeaveChannel', - defaultMessage: 'Are you sure you want to leave the {term} {name}?' + defaultMessage: 'Are you sure you want to leave the {term} {name}?', }; onPressAction = () => { this.props.actions.leaveChannel(channel, true).then(() => { @@ -167,7 +167,7 @@ class ChannelInfo extends PureComponent { title = {id: 'mobile.channel_info.alertTitleDeleteChannel', defaultMessage: 'Delete {term}'}; message = { id: 'mobile.channel_info.alertMessageDeleteChannel', - defaultMessage: 'Are you sure you want to delete the {term} {name}?' + defaultMessage: 'Are you sure you want to delete the {term} {name}?', }; onPressAction = async () => { const result = await this.props.actions.deleteChannel(channel.id); @@ -177,10 +177,10 @@ class ChannelInfo extends PureComponent { result.error, { id: 'mobile.channel_info.delete_failed', - defaultMessage: "We couldn't delete the channel {displayName}. Please check your connection and try again." + defaultMessage: "We couldn't delete the channel {displayName}. Please check your connection and try again.", }, { - displayName: channel.display_name + displayName: channel.display_name, } ); } else { @@ -195,14 +195,14 @@ class ChannelInfo extends PureComponent { message, { term: term.toLowerCase(), - name: channel.display_name + name: channel.display_name, } ), [{ - text: formatMessage({id: 'mobile.channel_info.alertNo', defaultMessage: 'No'}) + text: formatMessage({id: 'mobile.channel_info.alertNo', defaultMessage: 'No'}), }, { text: formatMessage({id: 'mobile.channel_info.alertYes', defaultMessage: 'Yes'}), - onPress: onPressAction + onPress: onPressAction, }], ); }); @@ -269,7 +269,7 @@ class ChannelInfo extends PureComponent { canEditChannel, navigator, status, - theme + theme, } = this.props; const style = getStyleSheet(theme); @@ -416,31 +416,31 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.03) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.03), }, footer: { marginTop: 40, borderTopWidth: 1, borderBottomWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.1), - borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1) + borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1), }, rowsContainer: { borderTopWidth: 1, borderBottomWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.1), borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1), - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, separator: { marginHorizontal: 15, height: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.1) - } + backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), + }, }; }); diff --git a/app/screens/channel_info/channel_info_header.js b/app/screens/channel_info/channel_info_header.js index d97ddd52e..99d114ff4 100644 --- a/app/screens/channel_info/channel_info_header.js +++ b/app/screens/channel_info/channel_info_header.js @@ -5,7 +5,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Text, - View + View, } from 'react-native'; import ChanneIcon from 'app/components/channel_icon'; @@ -26,7 +26,7 @@ export default class ChannelInfoHeader extends React.PureComponent { purpose: PropTypes.string, status: PropTypes.string, theme: PropTypes.object.isRequired, - type: PropTypes.string.isRequired + type: PropTypes.string.isRequired, }; render() { @@ -40,7 +40,7 @@ export default class ChannelInfoHeader extends React.PureComponent { purpose, status, theme, - type + type, } = this.props; const style = getStyleSheet(theme); @@ -104,7 +104,7 @@ export default class ChannelInfoHeader extends React.PureComponent { id='mobile.routes.channelInfo.createdBy' defaultMessage='Created by {creator} on ' values={{ - creator + creator, }} /> { marginBottom: 40, padding: 15, borderBottomWidth: 1, - borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1) + borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1), }, channelName: { flex: 1, fontSize: 15, fontWeight: '600', - color: theme.centerChannelColor + color: theme.centerChannelColor, }, channelNameContainer: { flexDirection: 'row', alignItems: 'center', - paddingVertical: 10 + paddingVertical: 10, }, createdBy: { flexDirection: 'row', fontSize: 12, marginTop: 5, color: changeOpacity(theme.centerChannelColor, 0.5), - backgroundColor: 'transparent' + backgroundColor: 'transparent', }, detail: { fontSize: 13, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, header: { fontSize: 13, marginBottom: 10, color: theme.centerChannelColor, - backgroundColor: 'transparent' + backgroundColor: 'transparent', }, section: { - marginTop: 15 - } + marginTop: 15, + }, }; }); diff --git a/app/screens/channel_info/channel_info_row.js b/app/screens/channel_info/channel_info_row.js index 70adbf5d8..3efcaf81d 100644 --- a/app/screens/channel_info/channel_info_row.js +++ b/app/screens/channel_info/channel_info_row.js @@ -7,7 +7,7 @@ import { Switch, Text, TouchableHighlight, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -72,19 +72,19 @@ channelInfoRow.propTypes = { detail: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, - PropTypes.bool + PropTypes.bool, ]), icon: PropTypes.string.isRequired, iconColor: PropTypes.string, textId: PropTypes.string.isRequired, togglable: PropTypes.bool, textColor: PropTypes.string, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; channelInfoRow.defaultProps = { togglable: false, - shouldRender: true + shouldRender: true, }; const getStyleSheet = makeStyleSheetFromTheme((theme) => { @@ -93,25 +93,25 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { backgroundColor: theme.centerChannelBg, paddingHorizontal: 15, flexDirection: 'row', - alignItems: 'center' + alignItems: 'center', }, detail: { marginHorizontal: 15, color: changeOpacity(theme.centerChannelColor, 0.5), - fontSize: 15 + fontSize: 15, }, label: { flex: 1, marginLeft: 15, fontSize: 15, - paddingVertical: 15 + paddingVertical: 15, }, leftIcon: { - width: 17 + width: 17, }, rightIcon: { - color: changeOpacity(theme.centerChannelColor, 0.5) - } + color: changeOpacity(theme.centerChannelColor, 0.5), + }, }; }); diff --git a/app/screens/channel_info/index.js b/app/screens/channel_info/index.js index 2932f7339..8273c8178 100644 --- a/app/screens/channel_info/index.js +++ b/app/screens/channel_info/index.js @@ -7,7 +7,7 @@ import {connect} from 'react-redux'; import { closeDMChannel, closeGMChannel, - leaveChannel + leaveChannel, } from 'app/actions/views/channel'; import {getTheme} from 'mattermost-redux/selectors/entities/preferences'; @@ -18,7 +18,7 @@ import { getCurrentChannel, getCurrentChannelStats, getSortedFavoriteChannelIds, - canManageChannelMembers + canManageChannelMembers, } from 'mattermost-redux/selectors/entities/channels'; import {getCurrentUserId, getUser, getStatusForUserId, getCurrentUserRoles} from 'mattermost-redux/selectors/entities/users'; import {getUserIdFromChannelName, showDeleteOption, showManagementOptions} from 'mattermost-redux/utils/channel_utils'; @@ -56,7 +56,7 @@ function mapStateToProps(state) { isFavorite, status, theme: getTheme(state), - canManageUsers + canManageUsers, }; } @@ -70,8 +70,8 @@ function mapDispatchToProps(dispatch) { leaveChannel, favoriteChannel, unfavoriteChannel, - getCustomEmojisInText - }, dispatch) + getCustomEmojisInText, + }, dispatch), }; } diff --git a/app/screens/channel_members/channel_members.js b/app/screens/channel_members/channel_members.js index e9ad9929c..e2cb55440 100644 --- a/app/screens/channel_members/channel_members.js +++ b/app/screens/channel_members/channel_members.js @@ -7,7 +7,7 @@ import { Alert, InteractionManager, Platform, - View + View, } from 'react-native'; import {injectIntl, intlShape} from 'react-intl'; @@ -38,14 +38,14 @@ class ChannelMembers extends PureComponent { actions: PropTypes.shape({ getProfilesInChannel: PropTypes.func.isRequired, handleRemoveChannelMembers: PropTypes.func.isRequired, - searchProfiles: PropTypes.func.isRequired - }) + searchProfiles: PropTypes.func.isRequired, + }), }; removeButton = { disabled: true, id: 'remove-members', - showAsAction: 'always' + showAsAction: 'always', }; constructor(props) { @@ -61,14 +61,14 @@ class ChannelMembers extends PureComponent { searching: false, selectedMembers: {}, showNoResults: false, - term: '' + term: '', }; this.removeButton.title = props.intl.formatMessage({id: 'channel_members_modal.remove', defaultMessage: 'Remove'}); props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); if (props.canManageUsers) { props.navigator.setButtons({ - rightButtons: [this.removeButton] + rightButtons: [this.removeButton], }); } } @@ -130,7 +130,7 @@ class ChannelMembers extends PureComponent { searching: false, term: '', page: 0, - profiles: markSelectedProfiles(this.props.currentChannelMembers, this.state.selectedMembers) + profiles: markSelectedProfiles(this.props.currentChannelMembers, this.state.selectedMembers), }); }; @@ -141,7 +141,7 @@ class ChannelMembers extends PureComponent { emitCanRemoveMembers = (enabled) => { if (this.props.canManageUsers) { this.props.navigator.setButtons({ - rightButtons: [{...this.removeButton, disabled: !enabled}] + rightButtons: [{...this.removeButton, disabled: !enabled}], }); } }; @@ -151,7 +151,7 @@ class ChannelMembers extends PureComponent { if (this.props.canManageUsers) { this.props.navigator.setButtons({ - rightButtons: [{...this.removeButton, disabled: loading}] + rightButtons: [{...this.removeButton, disabled: loading}], }); } }; @@ -165,11 +165,11 @@ class ChannelMembers extends PureComponent { Alert.alert( formatMessage({ id: 'mobile.routes.channel_members.action', - defaultMessage: 'Remove Members' + defaultMessage: 'Remove Members', }), formatMessage({ id: 'mobile.routes.channel_members.action_message', - defaultMessage: 'You must select at least one member to remove from the channel.' + defaultMessage: 'You must select at least one member to remove from the channel.', }) ); return; @@ -178,17 +178,17 @@ class ChannelMembers extends PureComponent { Alert.alert( formatMessage({ id: 'mobile.routes.channel_members.action', - defaultMessage: 'Remove Members' + defaultMessage: 'Remove Members', }), formatMessage({ id: 'mobile.routes.channel_members.action_message_confirm', - defaultMessage: 'Are you sure you want to remove the selected members from the channel?' + defaultMessage: 'Are you sure you want to remove the selected members from the channel?', }), [{ - text: formatMessage({id: 'mobile.channel_list.alertNo', defaultMessage: 'No'}) + text: formatMessage({id: 'mobile.channel_list.alertNo', defaultMessage: 'No'}), }, { text: formatMessage({id: 'mobile.channel_list.alertYes', defaultMessage: 'Yes'}), - onPress: () => this.removeMembers(membersToRemove) + onPress: () => this.removeMembers(membersToRemove), }] ); }; @@ -202,7 +202,7 @@ class ChannelMembers extends PureComponent { } this.setState({ profiles: markSelectedProfiles(this.state.profiles, selectedMembers), - selectedMembers + selectedMembers, }); }; @@ -216,7 +216,7 @@ class ChannelMembers extends PureComponent { ({data}) => { if (data && data.length) { this.setState({ - page + page, }); } else { this.setState({next: false}); @@ -292,9 +292,9 @@ class ChannelMembers extends PureComponent { fontSize: 15, ...Platform.select({ android: { - marginBottom: -5 - } - }) + marginBottom: -5, + }, + }), }; return ( @@ -342,8 +342,8 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg - } + backgroundColor: theme.centerChannelBg, + }, }; }); diff --git a/app/screens/channel_members/index.js b/app/screens/channel_members/index.js index b1444c1b9..602b07f2c 100644 --- a/app/screens/channel_members/index.js +++ b/app/screens/channel_members/index.js @@ -21,7 +21,7 @@ function mapStateToProps(state) { requestStatus: state.requests.users.getProfilesInChannel.status, searchRequestStatus: state.requests.users.searchProfiles.status, removeMembersStatus: state.requests.channels.removeChannelMember.status, - canManageUsers: canManageChannelMembers(state) + canManageUsers: canManageChannelMembers(state), }; } @@ -30,8 +30,8 @@ function mapDispatchToProps(dispatch) { actions: bindActionCreators({ getProfilesInChannel, handleRemoveChannelMembers, - searchProfiles - }, dispatch) + searchProfiles, + }, dispatch), }; } diff --git a/app/screens/channel_peek/channel_peek.js b/app/screens/channel_peek/channel_peek.js index 6fab98887..28c81ecd6 100644 --- a/app/screens/channel_peek/channel_peek.js +++ b/app/screens/channel_peek/channel_peek.js @@ -12,18 +12,18 @@ export default class ChannelPeek extends PureComponent { static propTypes = { actions: PropTypes.shape({ loadPostsIfNecessaryWithRetry: PropTypes.func.isRequired, - markChannelAsRead: PropTypes.func.isRequired + markChannelAsRead: PropTypes.func.isRequired, }).isRequired, channelId: PropTypes.string.isRequired, currentUserId: PropTypes.string, lastViewedAt: PropTypes.number, navigator: PropTypes.object, postIds: PropTypes.array.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { - postVisibility: 15 + postVisibility: 15, }; constructor(props) { @@ -32,7 +32,7 @@ export default class ChannelPeek extends PureComponent { this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); props.actions.loadPostsIfNecessaryWithRetry(props.channelId); this.state = { - visiblePostIds: this.getVisiblePostIds(props) + visiblePostIds: this.getVisiblePostIds(props), }; } @@ -46,7 +46,7 @@ export default class ChannelPeek extends PureComponent { } this.setState({ - visiblePostIds + visiblePostIds, }); } @@ -69,7 +69,7 @@ export default class ChannelPeek extends PureComponent { currentUserId, lastViewedAt, navigator, - theme + theme, } = this.props; const {visiblePostIds} = this.state; @@ -96,7 +96,7 @@ const getStyle = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg - } + backgroundColor: theme.centerChannelBg, + }, }; }); diff --git a/app/screens/channel_peek/index.js b/app/screens/channel_peek/index.js index 5184cfdab..9410bc240 100644 --- a/app/screens/channel_peek/index.js +++ b/app/screens/channel_peek/index.js @@ -21,7 +21,7 @@ function mapStateToProps(state, ownProps) { currentUserId: getCurrentUserId(state), postIds: getPostIdsInChannel(state, channelId), lastViewedAt: getMyChannelMember(state, channelId).last_viewed_at, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -29,8 +29,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ loadPostsIfNecessaryWithRetry, - markChannelAsRead - }, dispatch) + markChannelAsRead, + }, dispatch), }; } diff --git a/app/screens/client_upgrade/client_upgrade.js b/app/screens/client_upgrade/client_upgrade.js index 8258ced37..2d528103f 100644 --- a/app/screens/client_upgrade/client_upgrade.js +++ b/app/screens/client_upgrade/client_upgrade.js @@ -9,7 +9,7 @@ import { Linking, ScrollView, TouchableOpacity, - View + View, } from 'react-native'; import {intlShape} from 'react-intl'; @@ -24,7 +24,7 @@ export default class ClientUpgrade extends PureComponent { static propTypes = { actions: PropTypes.shape({ logError: PropTypes.func.isRequired, - setLastUpgradeCheck: PropTypes.func.isRequired + setLastUpgradeCheck: PropTypes.func.isRequired, }).isRequired, currentVersion: PropTypes.string, closeAction: PropTypes.func, @@ -34,11 +34,11 @@ export default class ClientUpgrade extends PureComponent { latestVersion: PropTypes.string, navigator: PropTypes.object, theme: PropTypes.object.isRequired, - upgradeType: PropTypes.string + upgradeType: PropTypes.string, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props) { @@ -46,7 +46,7 @@ export default class ClientUpgrade extends PureComponent { this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); this.state = { - upgradeType: UpgradeTypes.NO_UPGRADE + upgradeType: UpgradeTypes.NO_UPGRADE, }; } @@ -77,7 +77,7 @@ export default class ClientUpgrade extends PureComponent { } this.setState({ - upgradeType + upgradeType, }); actions.setLastUpgradeCheck(); @@ -105,11 +105,11 @@ export default class ClientUpgrade extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.client_upgrade.download_error.title', - defaultMessage: 'Upgrade Error' + defaultMessage: 'Upgrade Error', }), intl.formatMessage({ id: 'mobile.client_upgrade.download_error.message', - defaultMessage: 'An error occurred while trying to open the download link.' + defaultMessage: 'An error occurred while trying to open the download link.', }) ); @@ -121,7 +121,7 @@ export default class ClientUpgrade extends PureComponent { if (event.type === 'NavBarButtonPress') { if (event.id === 'close-upgrade') { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); } } @@ -215,7 +215,7 @@ export default class ClientUpgrade extends PureComponent { defaultMessage='Lastest Version: {version}' style={styles.messageSubtitle} values={{ - version: latestVersion + version: latestVersion, }} /> {upgradeType !== UpgradeTypes.NO_UPGRADE && @@ -283,12 +283,12 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, image: { marginTop: 75, width: 76, - height: 75 + height: 75, }, messageButton: { marginBottom: 15, @@ -296,31 +296,31 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { borderRadius: 2, alignItems: 'center', justifyContent: 'center', - borderColor: theme.buttonBg + borderColor: theme.buttonBg, }, messageButtonText: { paddingVertical: 10, paddingHorizontal: 20, fontWeight: '600', - color: theme.buttonBg + color: theme.buttonBg, }, messageContainer: { marginTop: 25, flex: 1, alignSelf: 'stretch', - alignItems: 'center' + alignItems: 'center', }, messageCloseButton: { marginBottom: 15, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, messageSubtitle: { fontSize: 16, marginBottom: 20, color: theme.centerChannelColor, textAlign: 'center', - paddingHorizontal: 30 + paddingHorizontal: 30, }, messageTitle: { fontSize: 24, @@ -328,15 +328,15 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { fontWeight: '600', color: theme.centerChannelColor, textAlign: 'center', - paddingHorizontal: 30 + paddingHorizontal: 30, }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.03) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.03), }, scrollViewContent: { paddingBottom: 20, - alignItems: 'center' - } + alignItems: 'center', + }, }; }); diff --git a/app/screens/client_upgrade/index.js b/app/screens/client_upgrade/index.js index 34ce5ef86..bbb13161f 100644 --- a/app/screens/client_upgrade/index.js +++ b/app/screens/client_upgrade/index.js @@ -18,7 +18,7 @@ function mapStateToProps(state) { forceUpgrade, latestVersion, minVersion, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -26,8 +26,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ logError, - setLastUpgradeCheck - }, dispatch) + setLastUpgradeCheck, + }, dispatch), }; } diff --git a/app/screens/clock_display/clock_display.android.js b/app/screens/clock_display/clock_display.android.js index af72ae7a1..51ce50bfd 100644 --- a/app/screens/clock_display/clock_display.android.js +++ b/app/screens/clock_display/clock_display.android.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { TouchableOpacity, Modal, - View + View, } from 'react-native'; import StatusBar from 'app/components/status_bar'; @@ -18,19 +18,19 @@ export default class ClockDisplay extends ClockDisplayBase { static propTypes = { showModal: PropTypes.bool.isRequired, militaryTime: PropTypes.bool.isRequired, - onClose: PropTypes.func.isRequired + onClose: PropTypes.func.isRequired, }; setMilitaryTime = (value) => { this.setState({ - newMilitaryTime: value + newMilitaryTime: value, }); }; closeModal = () => { const {militaryTime, onClose} = this.props; this.setState({ - newMilitaryTime: militaryTime + newMilitaryTime: militaryTime, }); onClose(); @@ -51,17 +51,17 @@ export default class ClockDisplay extends ClockDisplayBase { const options = [{ label: intl.formatMessage({ id: 'user.settings.display.normalClock', - defaultMessage: '12-hour clock (example: 4:00 PM)' + defaultMessage: '12-hour clock (example: 4:00 PM)', }), value: 'false', - checked: newMilitaryTime === 'false' + checked: newMilitaryTime === 'false', }, { label: intl.formatMessage({ id: 'user.settings.display.militaryClock', - defaultMessage: '24-hour clock (example: 16:00)' + defaultMessage: '24-hour clock (example: 16:00)', }), value: 'true', - checked: newMilitaryTime === 'true' + checked: newMilitaryTime === 'true', }]; return ( @@ -143,69 +143,69 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), - flex: 1 + flex: 1, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), height: 1, - width: '100%' + width: '100%', }, modalOverlay: { backgroundColor: changeOpacity('#000000', 0.6), alignItems: 'center', - flex: 1 + flex: 1, }, modal: { backgroundColor: theme.centerChannelBg, borderRadius: 4, marginTop: 20, - width: '95%' + width: '95%', }, modalBody: { - paddingHorizontal: 24 + paddingHorizontal: 24, }, modalTitleContainer: { marginBottom: 30, - marginTop: 20 + marginTop: 20, }, modalTitle: { color: theme.centerChannelColor, - fontSize: 19 + fontSize: 19, }, modalHelpText: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 13, - marginTop: 20 + marginTop: 20, }, modalFooter: { alignItems: 'flex-end', height: 58, marginTop: 40, - width: '100%' + width: '100%', }, modalFooterContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - paddingRight: 24 + paddingRight: 24, }, modalFooterOptionContainer: { alignItems: 'center', height: 40, justifyContent: 'center', paddingHorizontal: 10, - paddingVertical: 5 + paddingVertical: 5, }, modalFooterOption: { color: theme.linkColor, - fontSize: 14 + fontSize: 14, }, modalFooterButtonSpacer: { - marginRight: 10 - } + marginRight: 10, + }, }; }); diff --git a/app/screens/clock_display/clock_display.ios.js b/app/screens/clock_display/clock_display.ios.js index 0142e2f80..c4f043d4d 100644 --- a/app/screens/clock_display/clock_display.ios.js +++ b/app/screens/clock_display/clock_display.ios.js @@ -1,6 +1,6 @@ import React from 'react'; import { - View + View, } from 'react-native'; import StatusBar from 'app/components/status_bar'; @@ -66,12 +66,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), flex: 1, - paddingTop: 35 - } + paddingTop: 35, + }, }; }); diff --git a/app/screens/clock_display/clock_display_base.js b/app/screens/clock_display/clock_display_base.js index cef94e7df..2fdc0d816 100644 --- a/app/screens/clock_display/clock_display_base.js +++ b/app/screens/clock_display/clock_display_base.js @@ -13,24 +13,24 @@ export default class ClockDisplayBase extends PureComponent { militaryTime: PropTypes.string.isRequired, userId: PropTypes.string.isRequired, actions: PropTypes.shape({ - savePreferences: PropTypes.func.isRequired - }).isRequired + savePreferences: PropTypes.func.isRequired, + }).isRequired, }; static contextTypes = { - intl: intlShape.isRequired + intl: intlShape.isRequired, }; constructor(props) { super(props); this.state = { - newMilitaryTime: props.militaryTime + newMilitaryTime: props.militaryTime, }; } setMilitaryTime = (value) => { this.setState({ - newMilitaryTime: value + newMilitaryTime: value, }); this.saveClockDisplayPreference(value); @@ -43,7 +43,7 @@ export default class ClockDisplayBase extends PureComponent { user_id: userId, category: Preferences.CATEGORY_DISPLAY_SETTINGS, name: 'use_military_time', - value: newMilitaryTime + value: newMilitaryTime, }; savePreferences(userId, [timePreference]); diff --git a/app/screens/clock_display/index.js b/app/screens/clock_display/index.js index e327c4eda..df1eecd7c 100644 --- a/app/screens/clock_display/index.js +++ b/app/screens/clock_display/index.js @@ -18,15 +18,15 @@ function mapStateToProps(state) { return { userId: currentUserId, theme: getTheme(state), - militaryTime + militaryTime, }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - savePreferences - }, dispatch) + savePreferences, + }, dispatch), }; } diff --git a/app/screens/code/code.js b/app/screens/code/code.js index b5114d8e8..30648df68 100644 --- a/app/screens/code/code.js +++ b/app/screens/code/code.js @@ -7,7 +7,7 @@ import { ScrollView, StyleSheet, Text, - View + View, } from 'react-native'; import {getCodeFont} from 'app/utils/markdown'; @@ -17,7 +17,7 @@ export default class Code extends React.PureComponent { static propTypes = { navigator: PropTypes.object.isRequired, theme: PropTypes.object.isRequired, - content: PropTypes.string.isRequired + content: PropTypes.string.isRequired, }; componentWillReceiveProps(nextProps) { @@ -75,11 +75,11 @@ export default class Code extends React.PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { scrollContainer: { - flex: 1 + flex: 1, }, container: { minHeight: '100%', - flexDirection: 'row' + flexDirection: 'row', }, lineNumbers: { alignItems: 'center', @@ -89,30 +89,30 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flexDirection: 'column', justifyContent: 'flex-start', paddingHorizontal: 6, - paddingVertical: 4 + paddingVertical: 4, }, lineNumbersRight: { - alignItems: 'flex-end' + alignItems: 'flex-end', }, lineNumbersText: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 12, - lineHeight: 18 + lineHeight: 18, }, codeContainer: { flexGrow: 0, flexShrink: 1, - width: '100%' + width: '100%', }, code: { paddingHorizontal: 6, - paddingVertical: 4 + paddingVertical: 4, }, codeText: { color: changeOpacity(theme.centerChannelColor, 0.65), fontFamily: getCodeFont(), fontSize: 12, - lineHeight: 18 - } + lineHeight: 18, + }, }; }); diff --git a/app/screens/code/index.js b/app/screens/code/index.js index 367c1b27f..aebf89466 100644 --- a/app/screens/code/index.js +++ b/app/screens/code/index.js @@ -9,7 +9,7 @@ import Code from './code'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/create_channel/create_channel.js b/app/screens/create_channel/create_channel.js index 1153bd560..e6731f73e 100644 --- a/app/screens/create_channel/create_channel.js +++ b/app/screens/create_channel/create_channel.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {intlShape} from 'react-intl'; import { Keyboard, - InteractionManager + InteractionManager, } from 'react-native'; import {General, RequestStatus} from 'mattermost-redux/constants'; @@ -25,26 +25,26 @@ export default class CreateChannel extends PureComponent { channelType: PropTypes.string, closeButton: PropTypes.object, actions: PropTypes.shape({ - handleCreateChannel: PropTypes.func.isRequired - }) + handleCreateChannel: PropTypes.func.isRequired, + }), }; static contextTypes = { - intl: intlShape + intl: intlShape, }; static defaultProps = { - channelType: General.OPEN_CHANNEL + channelType: General.OPEN_CHANNEL, }; leftButton = { - id: 'close-new-channel' + id: 'close-new-channel', }; rightButton = { id: 'create-channel', disabled: true, - showAsAction: 'always' + showAsAction: 'always', }; constructor(props, context) { @@ -55,7 +55,7 @@ export default class CreateChannel extends PureComponent { creating: false, displayName: '', purpose: '', - header: '' + header: '', }; this.rightButton.title = context.intl.formatMessage({id: 'mobile.create_channel', defaultMessage: 'Create'}); @@ -65,7 +65,7 @@ export default class CreateChannel extends PureComponent { } const buttons = { - rightButtons: [this.rightButton] + rightButtons: [this.rightButton], }; if (this.left) { @@ -115,14 +115,14 @@ export default class CreateChannel extends PureComponent { this.props.navigator.pop({animated: true}); } else { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); } }; emitCanCreateChannel = (enabled) => { const buttons = { - rightButtons: [{...this.rightButton, disabled: !enabled}] + rightButtons: [{...this.rightButton, disabled: !enabled}], }; if (this.left) { @@ -134,7 +134,7 @@ export default class CreateChannel extends PureComponent { emitCreating = (loading) => { const buttons = { - rightButtons: [{...this.rightButton, disabled: loading}] + rightButtons: [{...this.rightButton, disabled: loading}], }; if (this.left) { @@ -180,14 +180,14 @@ export default class CreateChannel extends PureComponent { navigator, theme, deviceWidth, - deviceHeight + deviceHeight, } = this.props; const { error, creating, displayName, purpose, - header + header, } = this.state; return ( diff --git a/app/screens/create_channel/index.js b/app/screens/create_channel/index.js index 90400719a..b4a0e5941 100644 --- a/app/screens/create_channel/index.js +++ b/app/screens/create_channel/index.js @@ -19,15 +19,15 @@ function mapStateToProps(state) { createChannelRequest, theme: getTheme(state), deviceWidth, - deviceHeight + deviceHeight, }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - handleCreateChannel - }, dispatch) + handleCreateChannel, + }, dispatch), }; } diff --git a/app/screens/edit_channel/edit_channel.js b/app/screens/edit_channel/edit_channel.js index af1097a8c..a4fc95841 100644 --- a/app/screens/edit_channel/edit_channel.js +++ b/app/screens/edit_channel/edit_channel.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {intlShape} from 'react-intl'; import { Keyboard, - InteractionManager + InteractionManager, } from 'react-native'; import {General, RequestStatus} from 'mattermost-redux/constants'; @@ -20,32 +20,32 @@ import {cleanUpUrlable} from 'app/utils/url'; const messages = { display_name_required: { id: 'mobile.rename_channel.display_name_required', - defaultMessage: 'Channel name is required' + defaultMessage: 'Channel name is required', }, display_name_maxLength: { id: 'mobile.rename_channel.display_name_maxLength', - defaultMessage: 'Channel name must be less than {maxLength, number} characters' + defaultMessage: 'Channel name must be less than {maxLength, number} characters', }, display_name_minLength: { id: 'mobile.rename_channel.display_name_minLength', - defaultMessage: 'Channel name must be {minLength, number} or more characters' + defaultMessage: 'Channel name must be {minLength, number} or more characters', }, name_required: { id: 'mobile.rename_channel.name_required', - defaultMessage: 'URL is required' + defaultMessage: 'URL is required', }, name_maxLength: { id: 'mobile.rename_channel.name_maxLength', - defaultMessage: 'URL must be less than {maxLength, number} characters' + defaultMessage: 'URL must be less than {maxLength, number} characters', }, name_minLength: { id: 'mobile.rename_channel.name_minLength', - defaultMessage: 'URL must be {minLength, number} or more characters' + defaultMessage: 'URL must be {minLength, number} or more characters', }, name_lowercase: { id: 'mobile.rename_channel.name_lowercase', - defaultMessage: 'URL be lowercase alphanumeric characters' - } + defaultMessage: 'URL be lowercase alphanumeric characters', + }, }; export default class EditChannel extends PureComponent { @@ -59,18 +59,18 @@ export default class EditChannel extends PureComponent { updateChannelRequest: PropTypes.object.isRequired, closeButton: PropTypes.object, actions: PropTypes.shape({ - patchChannel: PropTypes.func.isRequired - }) + patchChannel: PropTypes.func.isRequired, + }), }; static contextTypes = { - intl: intlShape + intl: intlShape, }; rightButton = { id: 'edit-channel', disabled: true, - showAsAction: 'always' + showAsAction: 'always', }; constructor(props, context) { @@ -80,8 +80,8 @@ export default class EditChannel extends PureComponent { display_name: displayName, header, purpose, - name: channelURL - } + name: channelURL, + }, } = props; this.state = { @@ -90,13 +90,13 @@ export default class EditChannel extends PureComponent { displayName, channelURL, purpose, - header + header, }; this.rightButton.title = context.intl.formatMessage({id: 'mobile.edit_channel', defaultMessage: 'Save'}); const buttons = { - rightButtons: [this.rightButton] + rightButtons: [this.rightButton], }; props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); @@ -142,7 +142,7 @@ export default class EditChannel extends PureComponent { emitCanUpdateChannel = (enabled) => { const buttons = { - rightButtons: [{...this.rightButton, disabled: !enabled}] + rightButtons: [{...this.rightButton, disabled: !enabled}], }; this.props.navigator.setButtons(buttons); @@ -150,7 +150,7 @@ export default class EditChannel extends PureComponent { emitUpdating = (loading) => { const buttons = { - rightButtons: [{...this.rightButton, disabled: loading}] + rightButtons: [{...this.rightButton, disabled: loading}], }; this.props.navigator.setButtons(buttons); @@ -205,7 +205,7 @@ export default class EditChannel extends PureComponent { display_name: isDirect ? '' : displayName, name: channelURL, purpose, - header + header, }; if (!isDirect) { @@ -261,13 +261,13 @@ export default class EditChannel extends PureComponent { name: oldChannelURL, header: oldHeader, purpose: oldPurpose, - type + type, }, navigator, theme, currentTeamUrl, deviceWidth, - deviceHeight + deviceHeight, } = this.props; const { error, @@ -275,7 +275,7 @@ export default class EditChannel extends PureComponent { displayName, channelURL, purpose, - header + header, } = this.state; return ( diff --git a/app/screens/edit_channel/index.js b/app/screens/edit_channel/index.js index 8076ea471..2126bf9c4 100644 --- a/app/screens/edit_channel/index.js +++ b/app/screens/edit_channel/index.js @@ -24,15 +24,15 @@ function mapStateToProps(state) { updateChannelRequest, theme: getTheme(state), deviceWidth, - deviceHeight + deviceHeight, }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - patchChannel - }, dispatch) + patchChannel, + }, dispatch), }; } diff --git a/app/screens/edit_post/edit_post.js b/app/screens/edit_post/edit_post.js index e0ad3c2f0..e54a91e3d 100644 --- a/app/screens/edit_post/edit_post.js +++ b/app/screens/edit_post/edit_post.js @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'; import {intlShape} from 'react-intl'; import { Platform, - View + View, } from 'react-native'; import ErrorText from 'app/components/error_text'; @@ -19,7 +19,7 @@ import {RequestStatus} from 'mattermost-redux/constants'; export default class EditPost extends PureComponent { static propTypes = { actions: PropTypes.shape({ - editPost: PropTypes.func.isRequired + editPost: PropTypes.func.isRequired, }), closeButton: PropTypes.object, deviceHeight: PropTypes.number, @@ -27,20 +27,20 @@ export default class EditPost extends PureComponent { editPostRequest: PropTypes.object.isRequired, navigator: PropTypes.object, post: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; leftButton = { - id: 'close-edit-post' + id: 'close-edit-post', }; rightButton = { id: 'edit-post', - showAsAction: 'always' + showAsAction: 'always', }; constructor(props, context) { @@ -52,7 +52,7 @@ export default class EditPost extends PureComponent { props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); props.navigator.setButtons({ leftButtons: [{...this.leftButton, icon: props.closeButton}], - rightButtons: [this.rightButton] + rightButtons: [this.rightButton], }); } @@ -88,21 +88,21 @@ export default class EditPost extends PureComponent { close = () => { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); }; emitCanEditPost = (enabled) => { this.props.navigator.setButtons({ leftButtons: [{...this.leftButton, icon: this.props.closeButton}], - rightButtons: [{...this.rightButton, disabled: !enabled}] + rightButtons: [{...this.rightButton, disabled: !enabled}], }); }; emitEditing = (loading) => { this.props.navigator.setButtons({ leftButtons: [{...this.leftButton, icon: this.props.closeButton}], - rightButtons: [{...this.rightButton, disabled: loading}] + rightButtons: [{...this.rightButton, disabled: loading}], }); }; @@ -203,17 +203,17 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.03) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.03), }, errorContainer: { - paddingHorizontal: 10 + paddingHorizontal: 10, }, errorWrapper: { - alignItems: 'center' + alignItems: 'center', }, inputContainer: { borderTopWidth: 1, @@ -221,13 +221,13 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderTopColor: changeOpacity(theme.centerChannelColor, 0.1), borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1), backgroundColor: theme.centerChannelBg, - marginTop: 2 + marginTop: 2, }, input: { color: theme.centerChannelColor, fontSize: 14, padding: 15, - textAlignVertical: 'top' - } + textAlignVertical: 'top', + }, }; }); diff --git a/app/screens/edit_post/index.js b/app/screens/edit_post/index.js index d8508ace0..8bc401995 100644 --- a/app/screens/edit_post/index.js +++ b/app/screens/edit_post/index.js @@ -18,15 +18,15 @@ function mapStateToProps(state, ownProps) { ...getDimensions(state), editPostRequest, post: ownProps.post, - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - editPost - }, dispatch) + editPost, + }, dispatch), }; } diff --git a/app/screens/edit_profile/edit_profile.js b/app/screens/edit_profile/edit_profile.js index 83c38d4d3..7d2aabbb1 100644 --- a/app/screens/edit_profile/edit_profile.js +++ b/app/screens/edit_profile/edit_profile.js @@ -22,50 +22,50 @@ import EditProfileItem from './edit_profile_item'; const holders = { firstName: { id: 'user.settings.general.firstName', - defaultMessage: 'First Name' + defaultMessage: 'First Name', }, lastName: { id: 'user.settings.general.lastName', - defaultMessage: 'Last Name' + defaultMessage: 'Last Name', }, username: { id: 'user.settings.general.username', - defaultMessage: 'Username' + defaultMessage: 'Username', }, nickname: { id: 'user.settings.general.nickname', - defaultMessage: 'Nickname' + defaultMessage: 'Nickname', }, position: { id: 'user.settings.general.position', - defaultMessage: 'Position' + defaultMessage: 'Position', }, email: { id: 'user.settings.general.email', - defaultMessage: 'Email' - } + defaultMessage: 'Email', + }, }; export default class EditProfile extends PureComponent { static propTypes = { actions: PropTypes.shape({ handleUploadProfileImage: PropTypes.func.isRequired, - updateUser: PropTypes.func.isRequired + updateUser: PropTypes.func.isRequired, }).isRequired, config: PropTypes.object.isRequired, currentUser: PropTypes.object.isRequired, navigator: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; rightButton = { id: 'update-profile', disabled: true, - showAsAction: 'always' + showAsAction: 'always', }; constructor(props, context) { @@ -73,7 +73,7 @@ export default class EditProfile extends PureComponent { const {email, first_name: firstName, last_name: lastName, nickname, position, username} = props.currentUser; const buttons = { - rightButtons: [this.rightButton] + rightButtons: [this.rightButton], }; this.rightButton.title = context.intl.formatMessage({id: 'mobile.account.settings.save', defaultMessage: 'Save'}); @@ -86,7 +86,7 @@ export default class EditProfile extends PureComponent { lastName, nickname, position, - username + username, }; } @@ -122,13 +122,13 @@ export default class EditProfile extends PureComponent { close = () => { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); }; emitCanUpdateAccount = (enabled) => { const buttons = { - rightButtons: [{...this.rightButton, disabled: !enabled}] + rightButtons: [{...this.rightButton, disabled: !enabled}], }; this.props.navigator.setButtons(buttons); @@ -153,7 +153,7 @@ export default class EditProfile extends PureComponent { username, nickname, position, - email + email, } = this.state; const user = { first_name: firstName, @@ -161,7 +161,7 @@ export default class EditProfile extends PureComponent { username, nickname, position, - email + email, }; if (profileImage) { @@ -224,7 +224,7 @@ export default class EditProfile extends PureComponent { format={holders.firstName} helpText={formatMessage({ id: 'user.settings.general.field_handled_externally', - defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.' + defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.', })} updateValue={this.updateField} theme={theme} @@ -250,7 +250,7 @@ export default class EditProfile extends PureComponent { format={holders.lastName} helpText={formatMessage({ id: 'user.settings.general.field_handled_externally', - defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.' + defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.', })} updateValue={this.updateField} theme={theme} @@ -273,7 +273,7 @@ export default class EditProfile extends PureComponent { format={holders.username} helpText={formatMessage({ id: 'user.settings.general.field_handled_externally', - defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.' + defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.', })} updateValue={this.updateField} theme={theme} @@ -294,7 +294,7 @@ export default class EditProfile extends PureComponent { disabled = true; helpText = formatMessage({ id: 'user.settings.general.emailHelp1', - defaultMessage: 'Email is used for sign-in, notifications, and password reset. Email requires verification if changed.' + defaultMessage: 'Email is used for sign-in, notifications, and password reset. Email requires verification if changed.', }); } else if (currentUser.auth_service !== '') { disabled = true; @@ -303,31 +303,31 @@ export default class EditProfile extends PureComponent { case 'gitlab': helpText = formatMessage({ id: 'user.settings.general.emailGitlabCantUpdate', - defaultMessage: 'Login occurs through GitLab. Email cannot be updated. Email address used for notifications is {email}.' + defaultMessage: 'Login occurs through GitLab. Email cannot be updated. Email address used for notifications is {email}.', }, {email}); break; case 'google': helpText = formatMessage({ id: 'user.settings.general.emailGoogleCantUpdate', - defaultMessage: 'Login occurs through Google Apps. Email cannot be updated. Email address used for notifications is {email}.' + defaultMessage: 'Login occurs through Google Apps. Email cannot be updated. Email address used for notifications is {email}.', }, {email}); break; case 'office365': helpText = formatMessage({ id: 'user.settings.general.emailOffice365CantUpdate', - defaultMessage: 'Login occurs through Office 365. Email cannot be updated. Email address used for notifications is {email}.' + defaultMessage: 'Login occurs through Office 365. Email cannot be updated. Email address used for notifications is {email}.', }, {email}); break; case 'ldap': helpText = formatMessage({ id: 'user.settings.general.emailLdapCantUpdate', - defaultMessage: 'Login occurs through AD/LDAP. Email cannot be updated. Email address used for notifications is {email}.' + defaultMessage: 'Login occurs through AD/LDAP. Email cannot be updated. Email address used for notifications is {email}.', }, {email}); break; case 'saml': helpText = formatMessage({ id: 'user.settings.general.emailSamlCantUpdate', - defaultMessage: 'Login occurs through SAML. Email cannot be updated. Email address used for notifications is {email}.' + defaultMessage: 'Login occurs through SAML. Email cannot be updated. Email address used for notifications is {email}.', }, {email}); break; } @@ -364,7 +364,7 @@ export default class EditProfile extends PureComponent { format={holders.nickname} helpText={formatMessage({ id: 'user.settings.general.field_handled_externally', - defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.' + defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.', })} updateValue={this.updateField} theme={theme} @@ -388,7 +388,7 @@ export default class EditProfile extends PureComponent { format={holders.position} helpText={formatMessage({ id: 'user.settings.general.field_handled_externally', - defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.' + defaultMessage: 'This field is handled through your login provider. If you want to change it, you need to do so through your login provider.', })} updateValue={this.updateField} theme={theme} @@ -405,13 +405,13 @@ export default class EditProfile extends PureComponent { const { currentUser, theme, - navigator + navigator, } = this.props; const { profileImage, error, - updating + updating, } = this.state; const style = getStyleSheet(theme); @@ -490,39 +490,39 @@ export default class EditProfile extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { flex: { - flex: 1 + flex: 1, }, container: { - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, scrollView: { flex: 1, backgroundColor: changeOpacity(theme.centerChannelColor, 0.03), - paddingTop: 10 + paddingTop: 10, }, top: { padding: 25, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, errorContainer: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.03), - width: '100%' + width: '100%', }, errorWrapper: { justifyContent: 'center', - alignItems: 'center' + alignItems: 'center', }, errorText: { - fontSize: 14 + fontSize: 14, }, separator: { - height: 15 + height: 15, }, footer: { height: 40, - width: '100%' - } + width: '100%', + }, }; }); diff --git a/app/screens/edit_profile/edit_profile_item.js b/app/screens/edit_profile/edit_profile_item.js index a28405e5b..ec57f892c 100644 --- a/app/screens/edit_profile/edit_profile_item.js +++ b/app/screens/edit_profile/edit_profile_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { View, Text, - TextInput + TextInput, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -18,18 +18,18 @@ export default class AccountSettingsItem extends PureComponent { field: PropTypes.string.isRequired, format: PropTypes.shape({ id: PropTypes.string.isRequired, - defaultMessage: PropTypes.string.isRequired + defaultMessage: PropTypes.string.isRequired, }), helpText: PropTypes.string, optional: PropTypes.bool, theme: PropTypes.object.isRequired, updateValue: PropTypes.func.isRequired, - value: PropTypes.string.isRequired + value: PropTypes.string.isRequired, }; static defaultProps = { optional: false, - disabled: false + disabled: false, }; onChangeText = (value) => { @@ -44,7 +44,7 @@ export default class AccountSettingsItem extends PureComponent { helpText, optional, disabled, - value + value, } = this.props; const style = getStyleSheet(theme); @@ -94,36 +94,36 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderBottomWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.1), borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1), - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, input: { color: theme.centerChannelColor, fontSize: 14, height: 40, - paddingHorizontal: 15 + paddingHorizontal: 15, }, disabled: { - backgroundColor: changeOpacity(theme.centerChannelColor, 0.1) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), }, title: { fontSize: 14, color: theme.centerChannelColor, - marginLeft: 15 + marginLeft: 15, }, titleContainer15: { flexDirection: 'row', - marginTop: 15 + marginTop: 15, }, optional: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 14, - marginLeft: 5 + marginLeft: 5, }, helpText: { fontSize: 12, color: changeOpacity(theme.centerChannelColor, 0.5), marginHorizontal: 15, - marginVertical: 10 - } + marginVertical: 10, + }, }; }); diff --git a/app/screens/edit_profile/index.js b/app/screens/edit_profile/index.js index 7ec938af1..82af7209f 100644 --- a/app/screens/edit_profile/index.js +++ b/app/screens/edit_profile/index.js @@ -14,7 +14,7 @@ import EditProfile from './edit_profile'; function mapStateToProps(state) { return { config: getConfig(state), - theme: getTheme(state) + theme: getTheme(state), }; } @@ -22,8 +22,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ handleUploadProfileImage, - updateUser - }, dispatch) + updateUser, + }, dispatch), }; } diff --git a/app/screens/image_preview/downloader.android.js b/app/screens/image_preview/downloader.android.js index 3123f341a..64e1a4f64 100644 --- a/app/screens/image_preview/downloader.android.js +++ b/app/screens/image_preview/downloader.android.js @@ -8,7 +8,7 @@ import { StyleSheet, ToastAndroid, TouchableOpacity, - View + View, } from 'react-native'; import RNFetchBlob from 'react-native-fetch-blob'; import {intlShape} from 'react-intl'; @@ -28,18 +28,18 @@ export default class Downloader extends PureComponent { onDownloadCancel: PropTypes.func, onDownloadStart: PropTypes.func, onDownloadSuccess: PropTypes.func, - show: PropTypes.bool + show: PropTypes.bool, }; static defaultProps = { onCancelPress: emptyFunction, onDownloadStart: emptyFunction, onDownloadSuccess: emptyFunction, - show: false + show: false, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; checkForPermissions = async () => { @@ -48,7 +48,7 @@ export default class Downloader extends PureComponent { const {intl} = this.context; const description = intl.formatMessage({ id: 'mobile.downloader.android_permission', - defaultMessage: 'We need access to the downloads folder to save files.' + defaultMessage: 'We need access to the downloads folder to save files.', }); const permissionRequest = await PermissionsAndroid.request(EXTERNAL_STORAGE_PERMISSION, description); @@ -71,15 +71,15 @@ export default class Downloader extends PureComponent { try { const started = intl.formatMessage({ id: 'mobile.downloader.android_started', - defaultMessage: 'Download started' + defaultMessage: 'Download started', }); const title = intl.formatMessage({ id: 'mobile.downloader.android_success', - defaultMessage: 'download successful' + defaultMessage: 'download successful', }); const complete = intl.formatMessage({ id: 'mobile.downloader.android_complete', - defaultMessage: 'Download complete' + defaultMessage: 'Download complete', }); ToastAndroid.show(started, ToastAndroid.SHORT); @@ -96,10 +96,10 @@ export default class Downloader extends PureComponent { title: `${file.name} ${title}`, mime: file.mime_type, description: file.name, - mediaScannable: true - } + mediaScannable: true, + }, }).fetch('GET', imageUrl, { - Authorization: `Bearer ${Client4.token}` + Authorization: `Bearer ${Client4.token}`, }); await task; @@ -109,7 +109,7 @@ export default class Downloader extends PureComponent { } catch (error) { const failed = intl.formatMessage({ id: 'mobile.downloader.android_failed', - defaultMessage: 'Download failed' + defaultMessage: 'Download failed', }); ToastAndroid.show(failed, ToastAndroid.SHORT); @@ -140,18 +140,18 @@ export default class Downloader extends PureComponent { const styles = StyleSheet.create({ downloadButton: { flex: 1, - justifyContent: 'center' + justifyContent: 'center', }, downloadButtonText: { color: 'white', fontSize: 15, - paddingLeft: 15 + paddingLeft: 15, }, wrapper: { position: 'absolute', backgroundColor: '#575757', top: HEADER_HEIGHT, right: 0, - width: 150 - } + width: 150, + }, }); diff --git a/app/screens/image_preview/downloader.ios.js b/app/screens/image_preview/downloader.ios.js index 29ec412a7..ce9eeb2af 100644 --- a/app/screens/image_preview/downloader.ios.js +++ b/app/screens/image_preview/downloader.ios.js @@ -26,7 +26,7 @@ export default class Downloader extends PureComponent { prompt: PropTypes.bool, show: PropTypes.bool, downloadPath: PropTypes.string, - saveToCameraRoll: PropTypes.bool + saveToCameraRoll: PropTypes.bool, }; static defaultProps = { @@ -36,11 +36,11 @@ export default class Downloader extends PureComponent { prompt: false, show: false, force: false, - saveToCameraRoll: true + saveToCameraRoll: true, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props) { @@ -49,7 +49,7 @@ export default class Downloader extends PureComponent { this.state = { downloaderTop: new Animated.Value(props.deviceHeight), progress: 0, - started: false + started: false, }; } @@ -74,7 +74,7 @@ export default class Downloader extends PureComponent { this.toggleDownloader(); this.setState({ didCancel: false, - progress: 0 + progress: 0, }); } else if (!nextProps.show && this.props.show) { this.toggleDownloader(false); @@ -88,7 +88,7 @@ export default class Downloader extends PureComponent { this.setState({ didCancel: true, progress: 0, - started: false + started: false, }); } if (this.downloadTask) { @@ -106,8 +106,8 @@ export default class Downloader extends PureComponent { Animated.spring(this.state.downloaderTop, { toValue: top, tension: 8, - friction: 5 - }) + friction: 5, + }), ]).start(); }; @@ -222,12 +222,12 @@ export default class Downloader extends PureComponent { progress: 100, started: true, force: true, - isVideo: true + isVideo: true, }); Animated.spring(this.state.downloaderTop, { toValue: top, tension: 8, - friction: 5 + friction: 5, }).start(async () => { await CameraRoll.saveToCameraRoll(videoPath, 'video'); this.props.onDownloadSuccess(); @@ -243,18 +243,18 @@ export default class Downloader extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.downloader.failed_title', - defaultMessage: 'Download failed' + defaultMessage: 'Download failed', }), intl.formatMessage({ id: 'mobile.downloader.failed_description', - defaultMessage: 'An error occurred while downloading the file. Please check your internet connection and try again.\n' + defaultMessage: 'An error occurred while downloading the file. Please check your internet connection and try again.\n', }), [{ text: intl.formatMessage({ id: 'mobile.server_upgrade.button', - defaultMessage: 'OK' + defaultMessage: 'OK', }), - onPress: () => this.downloadDidCancel() + onPress: () => this.downloadDidCancel(), }] ); }; @@ -272,7 +272,7 @@ export default class Downloader extends PureComponent { session: file.id, timeout: 10000, indicator: true, - overwrite: true + overwrite: true, }; if (downloadPath && prompt) { @@ -298,7 +298,7 @@ export default class Downloader extends PureComponent { if (this.mounted) { this.setState({ progress, - started: true + started: true, }); } }); @@ -311,7 +311,7 @@ export default class Downloader extends PureComponent { if (this.mounted) { this.setState({ - progress: 100 + progress: 100, }, () => { // need to wait a bit for the progress circle UI to update to the give progress setTimeout(async () => { @@ -352,7 +352,7 @@ export default class Downloader extends PureComponent { Animated.spring(this.state.downloaderTop, { toValue: top, tension: 8, - friction: 5 + friction: 5, }).start(() => { if (show && !prompt) { this.startDownload(); @@ -405,29 +405,29 @@ const styles = StyleSheet.create({ right: 0, bottom: 0, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, bottomText: { color: 'white', fontSize: 16, - fontWeight: '600' + fontWeight: '600', }, cancelButton: { height: 30, width: 60, alignItems: 'center', justifyContent: 'center', - marginTop: 5 + marginTop: 5, }, cancelText: { color: 'white', - fontSize: 12 + fontSize: 12, }, container: { position: 'absolute', top: 0, left: 0, - width: '100%' + width: '100%', }, downloader: { alignItems: 'center', @@ -435,10 +435,10 @@ const styles = StyleSheet.create({ height: 220, width: 236, borderRadius: 8, - backgroundColor: 'rgba(0, 0, 0, 0.8)' + backgroundColor: 'rgba(0, 0, 0, 0.8)', }, progressContainer: { - flex: 1 + flex: 1, }, progressContent: { position: 'absolute', @@ -447,34 +447,34 @@ const styles = StyleSheet.create({ top: 0, left: 0, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, progressCircle: { width: '100%', height: '100%', alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, progressCircleContent: { width: 200, height: 200, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, progressCirclePercentage: { flex: 1, alignItems: 'center', - marginTop: 80 + marginTop: 80, }, progressText: { color: 'white', - fontSize: 18 + fontSize: 18, }, manualDownloadContainer: { alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, downloadTextContainer: { - marginTop: 5 - } + marginTop: 5, + }, }); diff --git a/app/screens/image_preview/image_preview.js b/app/screens/image_preview/image_preview.js index 161d6a7b2..f5d5e8854 100644 --- a/app/screens/image_preview/image_preview.js +++ b/app/screens/image_preview/image_preview.js @@ -13,7 +13,7 @@ import { StyleSheet, Text, TouchableOpacity, - View + View, } from 'react-native'; import RNFetchBlob from 'react-native-fetch-blob'; import Icon from 'react-native-vector-icons/Ionicons'; @@ -43,17 +43,17 @@ const DRAG_HORIZONTAL_THRESHOLD = 50; // Make sure that it's not a sloppy horizo const HEADER_HEIGHT = 64; const STATUSBAR_HEIGHT = Platform.select({ ios: 0, - android: 20 + android: 20, }); const SUPPORTED_VIDEO_FORMAT = Platform.select({ ios: ['video/mp4', 'video/x-m4v', 'video/quicktime'], - android: ['video/3gpp', 'video/x-matroska', 'video/mp4', 'video/webm'] + android: ['video/3gpp', 'video/x-matroska', 'video/mp4', 'video/webm'], }); export default class ImagePreview extends PureComponent { static propTypes = { actions: PropTypes.shape({ - addFileToFetchCache: PropTypes.func.isRequired + addFileToFetchCache: PropTypes.func.isRequired, }), canDownloadFiles: PropTypes.bool.isRequired, deviceHeight: PropTypes.number.isRequired, @@ -63,11 +63,11 @@ export default class ImagePreview extends PureComponent { files: PropTypes.array.isRequired, navigator: PropTypes.object, statusBarHeight: PropTypes.number, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props) { @@ -86,7 +86,7 @@ export default class ImagePreview extends PureComponent { pagingEnabled: true, showFileInfo: true, wrapperViewOpacity: new Animated.Value(0), - limitOpacity: new Animated.Value(0) + limitOpacity: new Animated.Value(0), }; } @@ -95,10 +95,10 @@ export default class ImagePreview extends PureComponent { onMoveShouldSetPanResponderCapture: this.mainViewMoveShouldSetPanResponderCapture, onPanResponderMove: Animated.event([null, { dx: 0, - dy: this.state.drag.y + dy: this.state.drag.y, }]), onPanResponderRelease: this.mainViewPanResponderRelease, - onPanResponderTerminate: this.mainViewPanResponderRelease + onPanResponderTerminate: this.mainViewPanResponderRelease, }); } @@ -106,7 +106,7 @@ export default class ImagePreview extends PureComponent { InteractionManager.runAfterInteractions(() => { Animated.timing(this.state.wrapperViewOpacity, { toValue: 1, - duration: 100 + duration: 100, }).start(); }); } @@ -194,13 +194,13 @@ export default class ImagePreview extends PureComponent { handleScroll = () => { Animated.timing(this.state.limitOpacity, { toValue: 1, - duration: 100 + duration: 100, }).start(); }; handleVideoSeek = (seeking) => { this.setState({ - isZooming: !seeking + isZooming: !seeking, }); }; @@ -208,7 +208,7 @@ export default class ImagePreview extends PureComponent { if (zooming !== this.state.isZooming) { this.setHeaderAndFileInfoVisible(!zooming); this.setState({ - isZooming: zooming + isZooming: zooming, }); } }; @@ -234,7 +234,7 @@ export default class ImagePreview extends PureComponent { } else { this.setHeaderAndFileInfoVisible(true); Animated.spring(this.state.drag, { - toValue: {x: 0, y: 0} + toValue: {x: 0, y: 0}, }).start(); } }; @@ -249,7 +249,7 @@ export default class ImagePreview extends PureComponent { setHeaderAndFileInfoVisible = (show) => { this.setState({ - showFileInfo: show + showFileInfo: show, }); if (Platform.OS === 'ios') { @@ -260,7 +260,7 @@ export default class ImagePreview extends PureComponent { Animated.timing(this.state.footerOpacity, { toValue: opacity, - duration: 300 + duration: 300, }).start(); }; @@ -270,18 +270,18 @@ export default class ImagePreview extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.image_preview.deleted_post_title', - defaultMessage: 'Post Deleted' + defaultMessage: 'Post Deleted', }), intl.formatMessage({ id: 'mobile.image_preview.deleted_post_message', - defaultMessage: 'This post and its files have been deleted. The previewer will now be closed.' + defaultMessage: 'This post and its files have been deleted. The previewer will now be closed.', }), [{ text: intl.formatMessage({ id: 'mobile.server_upgrade.button', - defaultMessage: 'OK' + defaultMessage: 'OK', }), - onPress: this.close + onPress: this.close, }] ); }; @@ -290,7 +290,7 @@ export default class ImagePreview extends PureComponent { EventEmitter.emit(NavigationTypes.NAVIGATION_CLOSE_MODAL); this.setState({ - showDownloader: true + showDownloader: true, }); }; @@ -327,7 +327,7 @@ export default class ImagePreview extends PureComponent { if (canOpenSettings) { grantOption = { text: formatMessage({id: 'mobile.android.permission_denied_retry', defaultMessage: 'Set permission'}), - onPress: () => Permissions.openSettings() + onPress: () => Permissions.openSettings(), }; } @@ -335,11 +335,11 @@ export default class ImagePreview extends PureComponent { formatMessage({id: 'mobile.android.photos_permission_denied_title', defaultMessage: 'Photo library access is required'}), formatMessage({ id: 'mobile.ios.photos_permission_denied_description', - defaultMessage: 'To save images and videos to your library, please change your permission settings.' + defaultMessage: 'To save images and videos to your library, please change your permission settings.', }), [ grantOption, - {text: formatMessage({id: 'mobile.android.permission_denied_dismiss', defaultMessage: 'Dismiss'})} + {text: formatMessage({id: 'mobile.android.permission_denied_dismiss', defaultMessage: 'Dismiss'})}, ] ); return; @@ -354,8 +354,8 @@ export default class ImagePreview extends PureComponent { action: this.saveVideo, text: { id: 'mobile.image_preview.save_video', - defaultMessage: 'Save Video' - } + defaultMessage: 'Save Video', + }, }); } else { this.showVideoDownloadRequiredAlert(); @@ -365,15 +365,15 @@ export default class ImagePreview extends PureComponent { action: this.showDownloader, text: { id: 'mobile.image_preview.save', - defaultMessage: 'Save Image' - } + defaultMessage: 'Save Image', + }, }); } const options = { title: file.name, items, - onCancelPress: () => this.setHeaderAndFileInfoVisible(true) + onCancelPress: () => this.setHeaderAndFileInfoVisible(true), }; if (items.length) { @@ -384,15 +384,15 @@ export default class ImagePreview extends PureComponent { title: '', animationType: 'none', passProps: { - ...options + ...options, }, navigatorStyle: { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, screenBackgroundColor: 'transparent', - modalPresentationStyle: 'overCurrentContext' - } + modalPresentationStyle: 'overCurrentContext', + }, }); } }; @@ -403,17 +403,17 @@ export default class ImagePreview extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.video.save_error_title', - defaultMessage: 'Save Video Error' + defaultMessage: 'Save Video Error', }), intl.formatMessage({ id: 'mobile.video.save_error_message', - defaultMessage: 'To save the video file you need to download it first.' + defaultMessage: 'To save the video file you need to download it first.', }), [{ text: intl.formatMessage({ id: 'mobile.server_upgrade.button', - defaultMessage: 'OK' - }) + defaultMessage: 'OK', + }), }] ); }; @@ -631,25 +631,25 @@ export default class ImagePreview extends PureComponent { const style = StyleSheet.create({ wrapper: { flex: 1, - backgroundColor: 'rgba(0, 0, 0, 0.8)' + backgroundColor: 'rgba(0, 0, 0, 0.8)', }, scrollView: { flex: 1, - backgroundColor: '#000' + backgroundColor: '#000', }, scrollViewContent: { - backgroundColor: '#000' + backgroundColor: '#000', }, pageWrapper: { alignItems: 'center', justifyContent: 'center', - flex: 1 + flex: 1, }, headerContainer: { position: 'absolute', top: 0, height: HEADER_HEIGHT, - zIndex: 2 + zIndex: 2, }, header: { backgroundColor: 'rgba(0, 0, 0, 0.8)', @@ -657,32 +657,32 @@ const style = StyleSheet.create({ position: 'absolute', top: 0, left: 0, - width: '100%' + width: '100%', }, headerControls: { alignItems: 'center', justifyContent: 'space-around', flexDirection: 'row', - marginTop: 18 + marginTop: 18, }, headerIcon: { height: 44, width: 48, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, title: { flex: 1, marginHorizontal: 10, color: 'white', fontSize: 15, - textAlign: 'center' + textAlign: 'center', }, footerContainer: { position: 'absolute', bottom: 0, height: 64, - zIndex: 2 + zIndex: 2, }, footer: { position: 'absolute', @@ -692,11 +692,11 @@ const style = StyleSheet.create({ height: 64, justifyContent: 'flex-end', paddingHorizontal: 24, - paddingBottom: 5 + paddingBottom: 5, }, filename: { color: 'white', fontSize: 14, - marginBottom: 10 - } + marginBottom: 10, + }, }); diff --git a/app/screens/image_preview/image_view.android.js b/app/screens/image_preview/image_view.android.js index 6e4557c9e..124ad1049 100644 --- a/app/screens/image_preview/image_view.android.js +++ b/app/screens/image_preview/image_view.android.js @@ -7,7 +7,7 @@ import PropTypes from 'prop-types'; import { Animated, View, - PanResponder + PanResponder, } from 'react-native'; const {Image: AnimatedImage} = Animated; @@ -25,7 +25,7 @@ function calcCenter(x1, y1, x2, y2) { return { x: middle(x1, x2), - y: middle(y1, y2) + y: middle(y1, y2), }; } @@ -42,7 +42,7 @@ function calcOffsetByZoom(width, height, imageWidth, imageHeight, zoom) { const yDiff = (imageHeight * zoom) - height; return { left: -xDiff / 2, - top: -yDiff / 2 + top: -yDiff / 2, }; } @@ -56,11 +56,11 @@ export default class ImageView extends Component { onZoom: PropTypes.func, style: PropTypes.object.isRequired, wrapperHeight: PropTypes.number.isRequired, - wrapperWidth: PropTypes.number.isRequired + wrapperWidth: PropTypes.number.isRequired, }; static defaultProps = { - onZoom: () => false + onZoom: () => false, }; constructor(props) { @@ -88,7 +88,7 @@ export default class ImageView extends Component { top: 0, left: 0, height: props.wrapperHeight, - width: props.wrapperWidth + width: props.wrapperWidth, }; } @@ -130,13 +130,13 @@ export default class ImageView extends Component { this.props.onZoom(this.state.zoom > 1); this.setState({ isZooming: false, - isMoving: false + isMoving: false, }); }, onPanResponderTerminate: () => { return; }, - onShouldBlockNativeResponder: () => false + onShouldBlockNativeResponder: () => false, }); } @@ -144,7 +144,7 @@ export default class ImageView extends Component { if (nextProps.wrapperWidth !== this.state.width || nextProps.wrapperHeight !== this.state.height) { this.setState({ height: nextProps.wrapperHeight, - width: nextProps.wrapperWidth + width: nextProps.wrapperWidth, }); } } @@ -162,7 +162,7 @@ export default class ImageView extends Component { initialY: this.state.height / 2, initialZoom: zoomScale, initialTopWithoutZoom: this.state.top - offsetByZoom.top, - initialLeftWithoutZoom: this.state.left - offsetByZoom.left + initialLeftWithoutZoom: this.state.left - offsetByZoom.left, }); this.props.onZoom(true); } @@ -185,7 +185,7 @@ export default class ImageView extends Component { this.setState({ zoom, left: left > 0 ? 0 : maxOffset(left, this.state.width, this.props.wrapperWidth * zoom), - top: top > 0 ? 0 : maxOffset(top, this.state.height, this.props.wrapperHeight * zoom) + top: top > 0 ? 0 : maxOffset(top, this.state.height, this.props.wrapperHeight * zoom), }); } else { const offsetByZoom = calcOffsetByZoom(this.state.width, this.state.height, @@ -199,7 +199,7 @@ export default class ImageView extends Component { initialLeft: this.state.left, initialZoom: this.state.zoom, initialTopWithoutZoom: this.state.top - offsetByZoom.top, - initialLeftWithoutZoom: this.state.left - offsetByZoom.left + initialLeftWithoutZoom: this.state.left - offsetByZoom.left, }); } } @@ -211,7 +211,7 @@ export default class ImageView extends Component { this.setState({ left: left > 0 ? 0 : maxOffset(left, this.state.width, this.props.wrapperWidth * this.state.zoom), - top: top > 0 ? 0 : maxOffset(top, this.state.height, this.props.wrapperHeight * this.state.zoom) + top: top > 0 ? 0 : maxOffset(top, this.state.height, this.props.wrapperHeight * this.state.zoom), }); } else { this.setState({ @@ -219,7 +219,7 @@ export default class ImageView extends Component { initialX: x, initialY: y, initialTop: this.state.top, - initialLeft: this.state.left + initialLeft: this.state.left, }); } } @@ -241,7 +241,7 @@ export default class ImageView extends Component { layoutKnown: true, width: this.props.wrapperWidth, height: this.props.wrapperHeight, - offsetTop + offsetTop, }); } @@ -271,7 +271,7 @@ export default class ImageView extends Component { this.props.onZoom(this.state.zoom > 1); this.setState({ isZooming: false, - isMoving: false + isMoving: false, }); }} style={{ @@ -279,7 +279,7 @@ export default class ImageView extends Component { top: this.state.offsetTop + this.state.top, left: this.state.offsetLeft + this.state.left, width: this.state.width * this.state.zoom, - height: this.state.height * this.state.zoom + height: this.state.height * this.state.zoom, }} > true, showsHorizontalScrollIndicator: false, - showsVerticalScrollIndicator: false + showsVerticalScrollIndicator: false, } attachScrollView = (c) => { @@ -46,7 +46,7 @@ export default class ImageView extends PureComponent { this.scrollResponder.scrollResponderZoomTo({ ...rect, - animated: true + animated: true, }); } @@ -93,6 +93,6 @@ const style = StyleSheet.create({ content: { alignItems: 'center', flex: 1, - justifyContent: 'center' - } + justifyContent: 'center', + }, }); diff --git a/app/screens/image_preview/index.js b/app/screens/image_preview/index.js index 6066b4623..b6505a787 100644 --- a/app/screens/image_preview/index.js +++ b/app/screens/image_preview/index.js @@ -24,7 +24,7 @@ function makeMapStateToProps() { fetchCache: state.views.fetchCache, files: getFilesForPost(state, ownProps.postId), theme: getTheme(state), - statusBarHeight: Platform.OS === 'ios' ? getStatusBarHeight(state) : STATUSBAR_HEIGHT + statusBarHeight: Platform.OS === 'ios' ? getStatusBarHeight(state) : STATUSBAR_HEIGHT, }; }; } @@ -32,8 +32,8 @@ function makeMapStateToProps() { function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - addFileToFetchCache - }, dispatch) + addFileToFetchCache, + }, dispatch), }; } diff --git a/app/screens/image_preview/previewer.js b/app/screens/image_preview/previewer.js index 87865f458..84ebafddc 100644 --- a/app/screens/image_preview/previewer.js +++ b/app/screens/image_preview/previewer.js @@ -9,7 +9,7 @@ import { PanResponder, Platform, View, - StyleSheet + StyleSheet, } from 'react-native'; import {Client4} from 'mattermost-redux/client'; @@ -34,7 +34,7 @@ export default class Previewer extends Component { onZoom: PropTypes.func, shrink: PropTypes.bool, wrapperHeight: PropTypes.number, - wrapperWidth: PropTypes.number + wrapperWidth: PropTypes.number, }; static defaultProps = { @@ -43,7 +43,7 @@ export default class Previewer extends Component { loading: false, onImageTap: () => true, onImageDoubleTap: () => true, - onZoom: () => true + onZoom: () => true, }; constructor(props) { @@ -55,7 +55,7 @@ export default class Previewer extends Component { opacity: new Animated.Value(0), requesting: true, retry: 0, - zooming: false + zooming: false, }; } @@ -77,7 +77,7 @@ export default class Previewer extends Component { onPanResponderTerminate: () => { return; }, - onShouldBlockNativeResponder: () => false + onShouldBlockNativeResponder: () => false, }); } @@ -96,7 +96,7 @@ export default class Previewer extends Component { ) { this.setState({ imageHeight: new Animated.Value(nextProps.imageHeight), - imageWidth: new Animated.Value(nextProps.imageWidth) + imageWidth: new Animated.Value(nextProps.imageWidth), }); } } @@ -119,15 +119,15 @@ export default class Previewer extends Component { const animations = [ Animated.timing(this.state.imageWidth, { toValue: width, - duration - }) + duration, + }), ]; if (Platform.OS === 'android') { animations.push( Animated.timing(this.state.imageHeight, { toValue: height, - duration + duration, }) ); } @@ -166,7 +166,7 @@ export default class Previewer extends Component { this.setState((prevState) => { return { retry: (prevState.retry + 1), - timestamp: Date.now() + timestamp: Date.now(), }; }); }, 300); @@ -175,12 +175,12 @@ export default class Previewer extends Component { handleLoad = () => { this.setState({ - requesting: false + requesting: false, }); Animated.timing(this.state.opacity, { toValue: 1, - duration: 300 + duration: 300, }).start(() => { this.props.addFileToFetchCache(this.handleGetImageURL()); }); @@ -188,7 +188,7 @@ export default class Previewer extends Component { handleLoadStart = () => { this.setState({ - requesting: true + requesting: true, }); }; @@ -212,7 +212,7 @@ export default class Previewer extends Component { } this.setState({ - isZooming: zoom + isZooming: zoom, }); this.props.onZoom(zoom); @@ -231,7 +231,7 @@ export default class Previewer extends Component { imageHeight, imageWidth, wrapperHeight, - wrapperWidth + wrapperWidth, } = this.props; let source = {}; @@ -251,13 +251,13 @@ export default class Previewer extends Component { const imageComponentLoaders = { onError: (isInFetchCache) ? null : this.handleLoadError, onLoadStart: isInFetchCache ? null : this.handleLoadStart, - onLoad: isInFetchCache ? null : this.handleLoad + onLoad: isInFetchCache ? null : this.handleLoad, }; const opacity = isInFetchCache ? 1 : this.state.opacity; const containerStyle = Platform.select({ android: {height: imageHeight, width: this.state.imageWidth, backgroundColor: '#000'}, - ios: {flex: 1, backgroundColor: '#000'} + ios: {flex: 1, backgroundColor: '#000'}, }); return ( @@ -295,13 +295,13 @@ export default class Previewer extends Component { const style = StyleSheet.create({ fileImageWrapper: { alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, loaderContainer: { position: 'absolute', height: '100%', width: '100%', alignItems: 'center', - justifyContent: 'center' - } + justifyContent: 'center', + }, }); diff --git a/app/screens/image_preview/video_preview.js b/app/screens/image_preview/video_preview.js index eb833dc26..24f08037c 100644 --- a/app/screens/image_preview/video_preview.js +++ b/app/screens/image_preview/video_preview.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Alert, StyleSheet, - View + View, } from 'react-native'; import Video from 'react-native-video'; import RNFetchBlob from 'react-native-fetch-blob'; @@ -28,11 +28,11 @@ export default class VideoPreview extends PureComponent { file: PropTypes.object.isRequired, onFullScreen: PropTypes.func.isRequired, onSeeking: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props) { @@ -46,7 +46,7 @@ export default class VideoPreview extends PureComponent { currentTime: 0, duration: 0, path: null, - showDownloader: true + showDownloader: true, }; } @@ -100,17 +100,17 @@ export default class VideoPreview extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.video_playback.failed_title', - defaultMessage: 'Video playback failed' + defaultMessage: 'Video playback failed', }), intl.formatMessage({ id: 'mobile.video_playback.failed_description', - defaultMessage: 'An error occurred while trying to play the video.\n' + defaultMessage: 'An error occurred while trying to play the video.\n', }), [{ text: intl.formatMessage({ id: 'mobile.server_upgrade.button', - defaultMessage: 'OK' - }) + defaultMessage: 'OK', + }), }] ); }; @@ -134,7 +134,7 @@ export default class VideoPreview extends PureComponent { onPaused = () => { this.setState({ paused: !this.state.paused, - playerState: this.state.paused ? PLAYER_STATE.PLAYING : PLAYER_STATE.PAUSED + playerState: this.state.paused ? PLAYER_STATE.PLAYING : PLAYER_STATE.PAUSED, }); }; @@ -170,7 +170,7 @@ export default class VideoPreview extends PureComponent { deviceWidth, file, onSeeking, - theme + theme, } = this.props; const {currentTime, duration, isFullScreen, isLoading, path, paused, playerState, showDownloader} = this.state; @@ -226,7 +226,7 @@ export default class VideoPreview extends PureComponent { const styles = StyleSheet.create({ container: { - flex: 1 + flex: 1, }, mediaPlayer: { position: 'absolute', @@ -234,6 +234,6 @@ const styles = StyleSheet.create({ left: 0, bottom: 0, right: 0, - backgroundColor: 'black' - } + backgroundColor: 'black', + }, }); diff --git a/app/screens/login/index.js b/app/screens/login/index.js index 681a2feb5..c3f31a29d 100644 --- a/app/screens/login/index.js +++ b/app/screens/login/index.js @@ -20,7 +20,7 @@ function mapStateToProps(state) { loginRequest, config, license, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -29,8 +29,8 @@ function mapDispatchToProps(dispatch) { actions: bindActionCreators({ ...LoginActions, checkMfa, - login - }, dispatch) + login, + }, dispatch), }; } diff --git a/app/screens/login/login.js b/app/screens/login/login.js index 062b92577..98a11212a 100644 --- a/app/screens/login/login.js +++ b/app/screens/login/login.js @@ -13,7 +13,7 @@ import { Text, TextInput, TouchableWithoutFeedback, - View + View, } from 'react-native'; import Button from 'react-native-button'; import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; @@ -42,21 +42,21 @@ class Login extends PureComponent { handleSuccessfulLogin: PropTypes.func.isRequired, getSession: PropTypes.func.isRequired, checkMfa: PropTypes.func.isRequired, - login: PropTypes.func.isRequired + login: PropTypes.func.isRequired, }).isRequired, config: PropTypes.object.isRequired, license: PropTypes.object.isRequired, loginId: PropTypes.string.isRequired, password: PropTypes.string.isRequired, checkMfaRequest: PropTypes.object.isRequired, - loginRequest: PropTypes.object.isRequired + loginRequest: PropTypes.object.isRequired, }; constructor(props) { super(props); this.state = { - error: null + error: null, }; } @@ -85,11 +85,11 @@ class Login extends PureComponent { date: new Date(expiresAt), message: intl.formatMessage({ id: 'mobile.session_expired', - defaultMessage: 'Session Expired: Please log in to continue receiving notifications.' + defaultMessage: 'Session Expired: Please log in to continue receiving notifications.', }), userInfo: { - localNotification: true - } + localNotification: true, + }, }); } @@ -104,8 +104,8 @@ class Login extends PureComponent { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, - screenBackgroundColor: 'transparent' - } + screenBackgroundColor: 'transparent', + }, }); }; @@ -123,8 +123,8 @@ class Login extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }; @@ -160,11 +160,11 @@ class Login extends PureComponent { ldapUsername: this.props.config.LdapLoginFieldName || this.props.intl.formatMessage({ id: 'login.ldapUsernameLower', - defaultMessage: 'AD/LDAP username' - }) - } - } - } + defaultMessage: 'AD/LDAP username', + }), + }, + }, + }, }); return; } @@ -174,9 +174,9 @@ class Login extends PureComponent { error: { intl: { id: 'login.noPassword', - defaultMessage: 'Please enter your password' - } - } + defaultMessage: 'Please enter your password', + }, + }, }); return; } @@ -258,8 +258,8 @@ class Login extends PureComponent { return { intl: { id: 'login.userNotFound', - defaultMessage: "We couldn't find an account matching your login credentials." - } + defaultMessage: "We couldn't find an account matching your login credentials.", + }, }; } else if ( errorId === 'api.user.check_user_password.invalid.app_error' || @@ -268,8 +268,8 @@ class Login extends PureComponent { return { intl: { id: 'login.invalidPassword', - defaultMessage: 'Your password is incorrect.' - } + defaultMessage: 'Your password is incorrect.', + }, }; } return error.message; @@ -399,15 +399,15 @@ class Login extends PureComponent { const style = StyleSheet.create({ container: { backgroundColor: '#FFFFFF', - flex: 1 + flex: 1, }, innerContainer: { alignItems: 'center', flexDirection: 'column', justifyContent: 'center', paddingHorizontal: 15, - paddingVertical: 50 - } + paddingVertical: 50, + }, }); export default injectIntl(Login); diff --git a/app/screens/login_options/index.js b/app/screens/login_options/index.js index 3c57febd7..bd15acae3 100644 --- a/app/screens/login_options/index.js +++ b/app/screens/login_options/index.js @@ -12,7 +12,7 @@ function mapStateToProps(state) { return { config, license, - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/login_options/login_options.js b/app/screens/login_options/login_options.js index 7a8de21d8..c1160c320 100644 --- a/app/screens/login_options/login_options.js +++ b/app/screens/login_options/login_options.js @@ -8,7 +8,7 @@ import { Image, ScrollView, StyleSheet, - Text + Text, } from 'react-native'; import Button from 'react-native-button'; import Orientation from 'react-native-orientation'; @@ -29,7 +29,7 @@ class LoginOptions extends PureComponent { navigator: PropTypes.object, config: PropTypes.object.isRequired, license: PropTypes.object.isRequired, - theme: PropTypes.object + theme: PropTypes.object, }; componentWillMount() { @@ -51,8 +51,8 @@ class LoginOptions extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }; @@ -67,11 +67,11 @@ class LoginOptions extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { - ssoType - } + ssoType, + }, }); }; @@ -86,7 +86,7 @@ class LoginOptions extends PureComponent { if (!forceHideFromLocal && (config.EnableSignInWithEmail === 'true' || config.EnableSignInWithUsername === 'true')) { const backgroundColor = config.EmailLoginButtonColor || '#2389d7'; const additionalStyle = { - backgroundColor + backgroundColor, }; if (config.hasOwnProperty('EmailLoginButtonBorderColor')) { @@ -120,7 +120,7 @@ class LoginOptions extends PureComponent { if (!forceHideFromLocal && license.IsLicensed === 'true' && config.EnableLdap === 'true') { const backgroundColor = config.LDAPLoginButtonColor || '#2389d7'; const additionalStyle = { - backgroundColor + backgroundColor, }; if (config.hasOwnProperty('LDAPLoginButtonBorderColor')) { @@ -196,7 +196,7 @@ class LoginOptions extends PureComponent { const backgroundColor = config.SamlLoginButtonColor || '#34a28b'; const additionalStyle = { - backgroundColor + backgroundColor, }; if (config.SAMLLoginButtonBorderColor) { @@ -263,15 +263,15 @@ class LoginOptions extends PureComponent { const style = StyleSheet.create({ container: { backgroundColor: '#FFFFFF', - flex: 1 + flex: 1, }, innerContainer: { alignItems: 'center', flexDirection: 'column', justifyContent: 'center', paddingHorizontal: 15, - paddingVertical: 50 - } + paddingVertical: 50, + }, }); export default injectIntl(LoginOptions); diff --git a/app/screens/mfa/index.js b/app/screens/mfa/index.js index 2976c1f02..df810d696 100644 --- a/app/screens/mfa/index.js +++ b/app/screens/mfa/index.js @@ -14,15 +14,15 @@ function mapStateToProps(state) { return { loginId, password, - loginRequest + loginRequest, }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - login - }, dispatch) + login, + }, dispatch), }; } diff --git a/app/screens/mfa/mfa.js b/app/screens/mfa/mfa.js index 86be3d08d..7d4528726 100644 --- a/app/screens/mfa/mfa.js +++ b/app/screens/mfa/mfa.js @@ -10,7 +10,7 @@ import { KeyboardAvoidingView, Platform, TouchableWithoutFeedback, - View + View, } from 'react-native'; import Button from 'react-native-button'; @@ -29,11 +29,11 @@ export default class Mfa extends PureComponent { static propTypes = { navigator: PropTypes.object, actions: PropTypes.shape({ - login: PropTypes.func.isRequired + login: PropTypes.func.isRequired, }).isRequired, loginId: PropTypes.string.isRequired, password: PropTypes.string.isRequired, - loginRequest: PropTypes.object.isRequired + loginRequest: PropTypes.object.isRequired, }; constructor(props) { @@ -41,7 +41,7 @@ export default class Mfa extends PureComponent { this.state = { token: '', - error: null + error: null, }; } @@ -72,7 +72,7 @@ export default class Mfa extends PureComponent { handleInput = (token) => { this.setState({ token, - error: null + error: null, }); }; @@ -91,9 +91,9 @@ export default class Mfa extends PureComponent { error: { intl: { id: 'login_mfa.tokenReq', - defaultMessage: 'Please enter an MFA token' - } - } + defaultMessage: 'Please enter an MFA token', + }, + }, }); return; } diff --git a/app/screens/more_channels/index.js b/app/screens/more_channels/index.js index ec16d4c92..27b6d45c0 100644 --- a/app/screens/more_channels/index.js +++ b/app/screens/more_channels/index.js @@ -41,7 +41,7 @@ function mapStateToProps(state) { currentTeamId, channels, theme: getTheme(state), - requestStatus + requestStatus, }; } @@ -52,8 +52,8 @@ function mapDispatchToProps(dispatch) { joinChannel, getChannels, searchChannels, - setChannelDisplayName - }, dispatch) + setChannelDisplayName, + }, dispatch), }; } diff --git a/app/screens/more_channels/more_channels.js b/app/screens/more_channels/more_channels.js index 491ee231d..7ce65f2c2 100644 --- a/app/screens/more_channels/more_channels.js +++ b/app/screens/more_channels/more_channels.js @@ -7,7 +7,7 @@ import {injectIntl, intlShape} from 'react-intl'; import { Platform, InteractionManager, - View + View, } from 'react-native'; import {General, RequestStatus} from 'mattermost-redux/constants'; @@ -37,17 +37,17 @@ class MoreChannels extends PureComponent { joinChannel: PropTypes.func.isRequired, getChannels: PropTypes.func.isRequired, searchChannels: PropTypes.func.isRequired, - setChannelDisplayName: PropTypes.func.isRequired - }).isRequired + setChannelDisplayName: PropTypes.func.isRequired, + }).isRequired, }; leftButton = { - id: 'close-more-channels' + id: 'close-more-channels', }; rightButton = { id: 'create-pub-channel', - showAsAction: 'always' + showAsAction: 'always', }; constructor(props) { @@ -63,13 +63,13 @@ class MoreChannels extends PureComponent { next: true, searching: false, showNoResults: false, - term: '' + term: '', }; this.rightButton.title = props.intl.formatMessage({id: 'mobile.create_channel', defaultMessage: 'Create'}); this.leftButton = {...this.leftButton, icon: props.closeButton}; const buttons = { - leftButtons: [this.leftButton] + leftButtons: [this.leftButton], }; if (props.canCreateChannels) { @@ -132,7 +132,7 @@ class MoreChannels extends PureComponent { headerButtons = (canCreateChannels, enabled) => { const buttons = { - leftButtons: [this.leftButton] + leftButtons: [this.leftButton], }; if (canCreateChannels) { @@ -156,7 +156,7 @@ class MoreChannels extends PureComponent { this.setState({ channels, term: text, - searching: true + searching: true, }); clearTimeout(this.searchTimeoutId); @@ -173,7 +173,7 @@ class MoreChannels extends PureComponent { this.setState({ term: '', searching: false, - page: 0 + page: 0, }); }; @@ -188,7 +188,7 @@ class MoreChannels extends PureComponent { ).then(({data}) => { if (data && data.length) { this.setState({ - page + page, }); } else { this.setState({next: false}); @@ -205,7 +205,7 @@ class MoreChannels extends PureComponent { break; case 'create-pub-channel': this.setState({ - createScreenVisible: true + createScreenVisible: true, }, this.onCreateChannel); break; } @@ -228,10 +228,10 @@ class MoreChannels extends PureComponent { result.error, { id: 'mobile.join_channel.error', - defaultMessage: "We couldn't join the channel {displayName}. Please check your connection and try again." + defaultMessage: "We couldn't join the channel {displayName}. Please check your connection and try again.", }, { - displayName: channel ? channel.display_name : '' + displayName: channel ? channel.display_name : '', } ); this.emitCanCreateChannel(true); @@ -264,11 +264,11 @@ class MoreChannels extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { - channelType: General.OPEN_CHANNEL - } + channelType: General.OPEN_CHANNEL, + }, }); }; @@ -290,9 +290,9 @@ class MoreChannels extends PureComponent { fontSize: 15, ...Platform.select({ android: { - marginBottom: -5 - } - }) + marginBottom: -5, + }, + }), }; content = ( @@ -347,19 +347,19 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, navTitle: { ...Platform.select({ android: { - fontSize: 18 + fontSize: 18, }, ios: { fontSize: 15, - fontWeight: 'bold' - } - }) - } + fontWeight: 'bold', + }, + }), + }, }; }); diff --git a/app/screens/more_dms/index.js b/app/screens/more_dms/index.js index 98a71558e..dba26df55 100644 --- a/app/screens/more_dms/index.js +++ b/app/screens/more_dms/index.js @@ -61,7 +61,7 @@ function mapStateToProps(state) { currentUserId: getCurrentUserId(state), currentTeamId: getCurrentTeamId(state), getRequest, - searchRequest + searchRequest, }; } @@ -73,8 +73,8 @@ function mapDispatchToProps(dispatch) { getProfiles, getProfilesInTeam, searchProfiles, - setChannelDisplayName - }, dispatch) + setChannelDisplayName, + }, dispatch), }; } diff --git a/app/screens/more_dms/more_dms.js b/app/screens/more_dms/more_dms.js index 9bb24eb73..b523ad8b6 100644 --- a/app/screens/more_dms/more_dms.js +++ b/app/screens/more_dms/more_dms.js @@ -7,7 +7,7 @@ import {injectIntl, intlShape} from 'react-intl'; import { InteractionManager, Platform, - View + View, } from 'react-native'; import {General, RequestStatus} from 'mattermost-redux/constants'; @@ -49,8 +49,8 @@ class MoreDirectMessages extends PureComponent { getProfiles: PropTypes.func.isRequired, getProfilesInTeam: PropTypes.func.isRequired, searchProfiles: PropTypes.func.isRequired, - setChannelDisplayName: PropTypes.func.isRequired - }).isRequired + setChannelDisplayName: PropTypes.func.isRequired, + }).isRequired, }; constructor(props) { @@ -69,7 +69,7 @@ class MoreDirectMessages extends PureComponent { loadingChannel: false, canSelect: true, selectedIds: {}, - selectedCount: 0 + selectedCount: 0, }; props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); @@ -141,14 +141,14 @@ class MoreDirectMessages extends PureComponent { id: START_BUTTON, title: this.props.intl.formatMessage({id: 'mobile.more_dms.start', defaultMessage: 'Start'}), showAsAction: 'always', - disabled: !startEnabled - }] + disabled: !startEnabled, + }], }); }; close = () => { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); }; @@ -191,7 +191,7 @@ class MoreDirectMessages extends PureComponent { searching: false, term: '', page: 0, - profiles: newProfiles + profiles: newProfiles, }); }; @@ -222,7 +222,7 @@ class MoreDirectMessages extends PureComponent { this.getProfiles(page).then(({data}) => { if (data && data.length) { this.setState({ - page + page, }); } else { this.setState({next: false}); @@ -244,7 +244,7 @@ class MoreDirectMessages extends PureComponent { const { profiles, selectedCount, - selectedIds + selectedIds, } = prevState; const wasSelected = selectedIds[id]; @@ -270,7 +270,7 @@ class MoreDirectMessages extends PureComponent { return { profiles: newProfiles, selectedIds: newSelectedIds, - selectedCount: Object.keys(newSelectedIds).length + selectedCount: Object.keys(newSelectedIds).length, }; }); } @@ -281,7 +281,7 @@ class MoreDirectMessages extends PureComponent { const { profiles, selectedCount, - selectedIds + selectedIds, } = prevState; const newSelectedIds = Object.assign({}, selectedIds); @@ -296,7 +296,7 @@ class MoreDirectMessages extends PureComponent { return { profiles: newProfiles, selectedIds: newSelectedIds, - selectedCount: Object.keys(newSelectedIds).length + selectedCount: Object.keys(newSelectedIds).length, }; }); } @@ -304,7 +304,7 @@ class MoreDirectMessages extends PureComponent { startConversation = async (selectedId) => { const { currentDisplayName, - actions + actions, } = this.props; if (this.state.loadingChannel) { @@ -312,7 +312,7 @@ class MoreDirectMessages extends PureComponent { } this.setState({ - loadingChannel: true + loadingChannel: true, }); // Save the current channel display name in case it fails @@ -335,7 +335,7 @@ class MoreDirectMessages extends PureComponent { }); } else { this.setState({ - loadingChannel: false + loadingChannel: false, }); actions.setChannelDisplayName(currentChannelDisplayName); @@ -348,7 +348,7 @@ class MoreDirectMessages extends PureComponent { allProfiles, currentUserId, intl, - teammateNameDisplay + teammateNameDisplay, } = this.props; const result = await actions.makeGroupChannel(ids); @@ -362,7 +362,7 @@ class MoreDirectMessages extends PureComponent { result.error, { id: 'mobile.open_gm.error', - defaultMessage: "We couldn't open a group message with those users. Please check your connection and try again." + defaultMessage: "We couldn't open a group message with those users. Please check your connection and try again.", } ); } @@ -374,7 +374,7 @@ class MoreDirectMessages extends PureComponent { const { actions, intl, - teammateNameDisplay + teammateNameDisplay, } = this.props; const user = this.state.profiles[id]; @@ -390,10 +390,10 @@ class MoreDirectMessages extends PureComponent { result.error, { id: 'mobile.open_dm.error', - defaultMessage: "We couldn't open a direct message with {displayName}. Please check your connection and try again." + defaultMessage: "We couldn't open a direct message with {displayName}. Please check your connection and try again.", }, { - displayName + displayName, } ); } @@ -433,12 +433,12 @@ class MoreDirectMessages extends PureComponent { const { getRequest, searchRequest, - theme + theme, } = this.props; const { loadingChannel, showNoResults, - term + term, } = this.state; const isLoading = ( @@ -461,9 +461,9 @@ class MoreDirectMessages extends PureComponent { fontSize: 15, ...Platform.select({ android: { - marginBottom: -5 - } - }) + marginBottom: -5, + }, + }), }; return ( @@ -518,11 +518,11 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, searchContainer: { - marginVertical: 5 - } + marginVertical: 5, + }, }; }); diff --git a/app/screens/more_dms/selected_users/index.js b/app/screens/more_dms/selected_users/index.js index 859a2a32e..23acb6b0e 100644 --- a/app/screens/more_dms/selected_users/index.js +++ b/app/screens/more_dms/selected_users/index.js @@ -12,7 +12,7 @@ function mapStateToProps(state) { return { theme: getTheme(state), profiles: getUsers(state), - teammateNameDisplay: getTeammateNameDisplaySetting(state) + teammateNameDisplay: getTeammateNameDisplaySetting(state), }; } diff --git a/app/screens/more_dms/selected_users/selected_user.js b/app/screens/more_dms/selected_users/selected_user.js index 279ee91f2..b7a2322d2 100644 --- a/app/screens/more_dms/selected_users/selected_user.js +++ b/app/screens/more_dms/selected_users/selected_user.js @@ -6,7 +6,7 @@ import React from 'react'; import { Text, TouchableOpacity, - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/MaterialIcons'; @@ -35,7 +35,7 @@ export default class SelectedUser extends React.PureComponent { /* * A handler function that will deselect a user when clicked on. */ - onRemove: PropTypes.func.isRequired + onRemove: PropTypes.func.isRequired, }; onRemove = () => { @@ -76,14 +76,14 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { marginBottom: 2, marginRight: 10, marginTop: 10, - paddingLeft: 10 + paddingLeft: 10, }, remove: { - paddingHorizontal: 10 + paddingHorizontal: 10, }, text: { color: theme.centerChannelColor, - fontSize: 13 - } + fontSize: 13, + }, }; }); diff --git a/app/screens/more_dms/selected_users/selected_users.js b/app/screens/more_dms/selected_users/selected_users.js index b87154547..ab2f51593 100644 --- a/app/screens/more_dms/selected_users/selected_users.js +++ b/app/screens/more_dms/selected_users/selected_users.js @@ -56,7 +56,7 @@ export default class SelectedUsers extends React.PureComponent { /* * A handler function that will deselect a user when clicked on. */ - onRemove: PropTypes.func.isRequired + onRemove: PropTypes.func.isRequired, }; render() { @@ -97,7 +97,7 @@ export default class SelectedUsers extends React.PureComponent { style={style.message} {...this.props.warnMessage} values={{ - remaining: this.props.maxCount - users.length + remaining: this.props.maxCount - users.length, }} /> ); @@ -118,19 +118,19 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { marginLeft: 5, - marginBottom: 5 + marginBottom: 5, }, users: { alignItems: 'flex-start', flexDirection: 'row', - flexWrap: 'wrap' + flexWrap: 'wrap', }, message: { color: changeOpacity(theme.centerChannelColor, 0.6), fontSize: 12, marginRight: 5, marginTop: 10, - marginBottom: 2 - } + marginBottom: 2, + }, }; }); diff --git a/app/screens/notification/index.js b/app/screens/notification/index.js index 3818c1f67..f64ec7ef7 100644 --- a/app/screens/notification/index.js +++ b/app/screens/notification/index.js @@ -33,15 +33,15 @@ function mapStateToProps(state, ownProps) { deviceWidth, user, teammateNameDisplay: getTeammateNameDisplaySetting(state), - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - loadFromPushNotification - }, dispatch) + loadFromPushNotification, + }, dispatch), }; } diff --git a/app/screens/notification/notification.js b/app/screens/notification/notification.js index e3bf175c7..8efa23e59 100644 --- a/app/screens/notification/notification.js +++ b/app/screens/notification/notification.js @@ -10,7 +10,7 @@ import { StyleSheet, Text, TouchableOpacity, - View + View, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -29,7 +29,7 @@ const IMAGE_SIZE = 33; export default class Notification extends PureComponent { static propTypes = { actions: PropTypes.shape({ - loadFromPushNotification: PropTypes.func.isRequired + loadFromPushNotification: PropTypes.func.isRequired, }).isRequired, channel: PropTypes.object, config: PropTypes.object, @@ -38,7 +38,7 @@ export default class Notification extends PureComponent { teammateNameDisplay: PropTypes.string, navigator: PropTypes.object, theme: PropTypes.object.isRequired, - user: PropTypes.object + user: PropTypes.object, }; notificationTapped = () => { @@ -55,7 +55,7 @@ export default class Notification extends PureComponent { } navigator.popToRoot({ - animated: false + animated: false, }); } }); @@ -214,27 +214,27 @@ const style = StyleSheet.create({ paddingHorizontal: 10, ...Platform.select({ android: { - height: 68 + height: 68, }, ios: { - height: 88 - } - }) + height: 88, + }, + }), }, iconContainer: { ...Platform.select({ android: { - paddingTop: 17 + paddingTop: 17, }, ios: { - paddingTop: 37 - } - }) + paddingTop: 37, + }, + }), }, icon: { borderRadius: (IMAGE_SIZE / 2), height: IMAGE_SIZE, - width: IMAGE_SIZE + width: IMAGE_SIZE, }, textContainer: { flex: 1, @@ -245,25 +245,25 @@ const style = StyleSheet.create({ ...Platform.select({ android: { marginTop: 17, - height: 50 + height: 50, }, ios: { - paddingTop: 37 - } - }) + paddingTop: 37, + }, + }), }, title: { color: '#FFFFFF', fontSize: 14, - fontWeight: '600' + fontWeight: '600', }, channelName: { alignSelf: 'stretch', alignItems: 'flex-start', - flex: 1 + flex: 1, }, message: { color: '#FFFFFF', - fontSize: 14 - } + fontSize: 14, + }, }); diff --git a/app/screens/options_modal/index.js b/app/screens/options_modal/index.js index c3184277c..cb1da6b18 100644 --- a/app/screens/options_modal/index.js +++ b/app/screens/options_modal/index.js @@ -9,7 +9,7 @@ import OptionsModal from './options_modal'; function mapStateToProps(state) { return { - ...getDimensions(state) + ...getDimensions(state), }; } diff --git a/app/screens/options_modal/options_modal.js b/app/screens/options_modal/options_modal.js index aaeb73e5f..8c098d298 100644 --- a/app/screens/options_modal/options_modal.js +++ b/app/screens/options_modal/options_modal.js @@ -7,7 +7,7 @@ import { Animated, StyleSheet, TouchableWithoutFeedback, - View + View, } from 'react-native'; import EventEmitter from 'mattermost-redux/utils/event_emitter'; @@ -29,19 +29,19 @@ export default class OptionsModal extends PureComponent { onCancelPress: PropTypes.func, title: PropTypes.oneOfType([ PropTypes.string, - PropTypes.object - ]) + PropTypes.object, + ]), }; static defaultProps = { - onCancelPress: emptyFunction + onCancelPress: emptyFunction, }; constructor(props) { super(props); this.state = { - top: new Animated.Value(props.deviceHeight) + top: new Animated.Value(props.deviceHeight), }; } @@ -49,7 +49,7 @@ export default class OptionsModal extends PureComponent { EventEmitter.on(NavigationTypes.NAVIGATION_CLOSE_MODAL, this.close); Animated.timing(this.state.top, { toValue: 0, - duration: DURATION + duration: DURATION, }).start(); } @@ -65,10 +65,10 @@ export default class OptionsModal extends PureComponent { close = () => { Animated.timing(this.state.top, { toValue: this.props.deviceHeight, - duration: DURATION + duration: DURATION, }).start(() => { this.props.navigator.dismissModal({ - animationType: 'none' + animationType: 'none', }); }); }; @@ -76,7 +76,7 @@ export default class OptionsModal extends PureComponent { render() { const { items, - title + title, } = this.props; return ( @@ -98,6 +98,6 @@ export default class OptionsModal extends PureComponent { const style = StyleSheet.create({ wrapper: { backgroundColor: 'rgba(0, 0, 0, 0.5)', - flex: 1 - } + flex: 1, + }, }); diff --git a/app/screens/options_modal/options_modal_list.android.js b/app/screens/options_modal/options_modal_list.android.js index b9334c508..9523640f6 100644 --- a/app/screens/options_modal/options_modal_list.android.js +++ b/app/screens/options_modal/options_modal_list.android.js @@ -7,7 +7,7 @@ import { StyleSheet, Text, TouchableOpacity, - View + View, } from 'react-native'; import IconFont from 'react-native-vector-icons/FontAwesome'; @@ -17,7 +17,7 @@ import {preventDoubleTap} from 'app/utils/tap'; export default class OptionsModalList extends PureComponent { static propTypes = { items: PropTypes.array.isRequired, - onCancelPress: PropTypes.func + onCancelPress: PropTypes.func, }; renderOptions = () => { @@ -70,7 +70,7 @@ export default class OptionsModalList extends PureComponent { return [ ...options, - cancel + cancel, ]; }; @@ -91,29 +91,29 @@ const style = StyleSheet.create({ alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', - padding: 15 + padding: 15, }, optionBorder: { borderBottomWidth: 1, - borderBottomColor: 'rgba(0, 0, 0, 0.1)' + borderBottomColor: 'rgba(0, 0, 0, 0.1)', }, optionContainer: { alignSelf: 'stretch', backgroundColor: 'white', borderRadius: 2, - marginHorizontal: 30 + marginHorizontal: 30, }, optionIcon: { - color: '#7f8180' + color: '#7f8180', }, optionText: { color: '#000', flex: 1, - fontSize: 16 + fontSize: 16, }, wrapper: { flex: 1, alignItems: 'center', - justifyContent: 'center' - } + justifyContent: 'center', + }, }); diff --git a/app/screens/options_modal/options_modal_list.ios.js b/app/screens/options_modal/options_modal_list.ios.js index 038bcb908..3929e2764 100644 --- a/app/screens/options_modal/options_modal_list.ios.js +++ b/app/screens/options_modal/options_modal_list.ios.js @@ -7,7 +7,7 @@ import { StyleSheet, Text, TouchableOpacity, - View + View, } from 'react-native'; import IconFont from 'react-native-vector-icons/FontAwesome'; @@ -20,8 +20,8 @@ export default class OptionsModalList extends PureComponent { onCancelPress: PropTypes.func, title: PropTypes.oneOfType([ PropTypes.string, - PropTypes.object - ]) + PropTypes.object, + ]), }; renderOptions = () => { @@ -84,7 +84,7 @@ export default class OptionsModalList extends PureComponent { return [ title, - ...options + ...options, ]; }; @@ -119,41 +119,41 @@ const style = StyleSheet.create({ alignItems: 'center', flexDirection: 'row', justifyContent: 'space-between', - padding: 15 + padding: 15, }, optionBorder: { borderBottomWidth: 1, - borderBottomColor: 'rgba(0, 0, 0, 0.1)' + borderBottomColor: 'rgba(0, 0, 0, 0.1)', }, optionCancelText: { color: '#CC3239', flex: 1, fontSize: 20, - textAlign: 'center' + textAlign: 'center', }, optionContainer: { alignSelf: 'stretch', backgroundColor: 'white', borderRadius: 12, marginBottom: 20, - marginHorizontal: 20 + marginHorizontal: 20, }, optionIcon: { - color: '#4E8ACC' + color: '#4E8ACC', }, optionText: { color: '#4E8ACC', flex: 1, - fontSize: 20 + fontSize: 20, }, optionTitleText: { color: '#7f8180', flex: 1, - textAlign: 'center' + textAlign: 'center', }, wrapper: { flex: 1, alignItems: 'center', - justifyContent: 'flex-end' - } + justifyContent: 'flex-end', + }, }); diff --git a/app/screens/search/channel_display_name/channel_display_name.js b/app/screens/search/channel_display_name/channel_display_name.js index 500eb8747..e30b2a5dc 100644 --- a/app/screens/search/channel_display_name/channel_display_name.js +++ b/app/screens/search/channel_display_name/channel_display_name.js @@ -10,7 +10,7 @@ import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; export default class ChannelDisplayName extends PureComponent { static propTypes = { displayName: PropTypes.string.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; render() { @@ -30,7 +30,7 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { fontSize: 14, fontWeight: '600', marginTop: 5, - paddingHorizontal: 16 - } + paddingHorizontal: 16, + }, }; }); diff --git a/app/screens/search/channel_display_name/index.js b/app/screens/search/channel_display_name/index.js index 55a3bddd1..e4614e087 100644 --- a/app/screens/search/channel_display_name/index.js +++ b/app/screens/search/channel_display_name/index.js @@ -17,7 +17,7 @@ function makeMapStateToProps() { return { displayName: channel.display_name, - theme: getTheme(state) + theme: getTheme(state), }; }; } diff --git a/app/screens/search/index.js b/app/screens/search/index.js index 30ad92bb4..66d14445b 100644 --- a/app/screens/search/index.js +++ b/app/screens/search/index.js @@ -15,7 +15,7 @@ import { handleSelectChannel, loadThreadIfNecessary, setChannelDisplayName, - setChannelLoading + setChannelLoading, } from 'app/actions/views/channel'; import {isLandscape} from 'app/selectors/device'; import {handleSearchDraftChanged} from 'app/actions/views/search'; @@ -35,7 +35,7 @@ function mapStateToProps(state) { postIds: state.entities.search.results, recent: recent[currentTeamId], searchingStatus: searchRequest.status, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -52,8 +52,8 @@ function mapDispatchToProps(dispatch) { searchPosts, selectPost, setChannelDisplayName, - setChannelLoading - }, dispatch) + setChannelLoading, + }, dispatch), }; } diff --git a/app/screens/search/search.js b/app/screens/search/search.js index 471b153ba..8f7a308a7 100644 --- a/app/screens/search/search.js +++ b/app/screens/search/search.js @@ -12,7 +12,7 @@ import { Text, TouchableHighlight, TouchableOpacity, - View + View, } from 'react-native'; import DeviceInfo from 'react-native-device-info'; import IonIcon from 'react-native-vector-icons/Ionicons'; @@ -52,7 +52,7 @@ class Search extends PureComponent { markChannelAsViewed: PropTypes.func.isRequired, removeSearchTerms: PropTypes.func.isRequired, searchPosts: PropTypes.func.isRequired, - selectPost: PropTypes.func.isRequired + selectPost: PropTypes.func.isRequired, }).isRequired, currentTeamId: PropTypes.string.isRequired, currentChannelId: PropTypes.string.isRequired, @@ -62,12 +62,12 @@ class Search extends PureComponent { postIds: PropTypes.array, recent: PropTypes.array.isRequired, searchingStatus: PropTypes.string, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { postIds: [], - recent: [] + recent: [], }; constructor(props) { @@ -81,7 +81,7 @@ class Search extends PureComponent { focusedPostId: null, preview: false, value: '', - managedConfig: {} + managedConfig: {}, }; } @@ -112,7 +112,7 @@ class Search extends PureComponent { requestAnimationFrame(() => { this.refs.list._wrapperListRef.getListRef().scrollToOffset({ //eslint-disable-line no-underscore-dangle animated: true, - offset: SECTION_HEIGHT + (2 * MODIFIER_LABEL_HEIGHT) + (recentLength * RECENT_LABEL_HEIGHT) + ((recentLength + 1) * RECENT_SEPARATOR_HEIGHT) + offset: SECTION_HEIGHT + (2 * MODIFIER_LABEL_HEIGHT) + (recentLength * RECENT_LABEL_HEIGHT) + ((recentLength + 1) * RECENT_SEPARATOR_HEIGHT), }); }); } @@ -149,12 +149,12 @@ class Search extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { channelId, - rootId - } + rootId, + }, }; navigator.push(options); @@ -182,9 +182,9 @@ class Search extends PureComponent { this.handleSelectionChange({ nativeEvent: { selection: { - end: value.length - } - } + end: value.length, + }, + }, }); } }; @@ -221,7 +221,7 @@ class Search extends PureComponent { this.setState({ preview: true, focusedChannelId: post.channel_id, - focusedPostId: post.id + focusedPostId: post.id, }); }; @@ -383,7 +383,7 @@ class Search extends PureComponent { } this.setState({ - managedConfig: nextConfig + managedConfig: nextConfig, }); }; @@ -391,7 +391,7 @@ class Search extends PureComponent { if (this.refs.list) { this.refs.list._wrapperListRef.getListRef().scrollToOffset({ //eslint-disable-line no-underscore-dangle animated: false, - offset: 0 + offset: 0, }); } }; @@ -405,9 +405,9 @@ class Search extends PureComponent { this.handleSelectionChange({ nativeEvent: { selection: { - end: terms.length + 1 - } - } + end: terms.length + 1, + }, + }, }); actions.searchPosts(currentTeamId, terms.trim(), isOrSearch); @@ -446,7 +446,7 @@ class Search extends PureComponent { this.setState({ preview: false, focusedChannelId: null, - focusedPostId: null + focusedPostId: null, }); }; @@ -458,7 +458,7 @@ class Search extends PureComponent { markChannelAsRead, setChannelLoading, setChannelDisplayName, - markChannelAsViewed + markChannelAsViewed, } = actions; setChannelLoading(channelId !== currentChannelId); @@ -487,12 +487,12 @@ class Search extends PureComponent { postIds, recent, searchingStatus, - theme + theme, } = this.props; const { preview, - value + value, } = this.state; const style = getStyleFromTheme(theme); const sections = [{ @@ -501,21 +501,21 @@ class Search extends PureComponent { modifier: `from:${intl.formatMessage({id: 'mobile.search.from_modifier_title', defaultMessage: 'username'})}`, description: intl.formatMessage({ id: 'mobile.search.from_modifier_description', - defaultMessage: 'to find posts from specific users' - }) + defaultMessage: 'to find posts from specific users', + }), }, { value: 'in:', modifier: `in:${intl.formatMessage({id: 'mobile.search.in_modifier_title', defaultMessage: 'channel-name'})}`, description: intl.formatMessage({ id: 'mobile.search.in_modifier_description', - defaultMessage: 'to find posts in specific channels' - }) + defaultMessage: 'to find posts in specific channels', + }), }], key: 'modifiers', title: '', renderItem: this.renderModifiers, keyExtractor: this.keyModifierExtractor, - ItemSeparatorComponent: this.renderRecentSeparator + ItemSeparatorComponent: this.renderRecentSeparator, }]; if (recent.length) { @@ -525,7 +525,7 @@ class Search extends PureComponent { title: intl.formatMessage({id: 'mobile.search.recentTitle', defaultMessage: 'Recent Searches'}), renderItem: this.renderRecentItem, keyExtractor: this.keyRecentExtractor, - ItemSeparatorComponent: this.renderRecentSeparator + ItemSeparatorComponent: this.renderRecentSeparator, }); } @@ -538,7 +538,7 @@ class Search extends PureComponent { - ) + ), }]; break; case RequestStatus.SUCCESS: @@ -553,7 +553,7 @@ class Search extends PureComponent { defaultMessage='No Results Found' style={style.noResults} /> - ) + ), }]; } break; @@ -567,7 +567,7 @@ class Search extends PureComponent { theme={theme} /> - ) + ), }]; break; } @@ -579,7 +579,7 @@ class Search extends PureComponent { title: intl.formatMessage({id: 'search_header.results', defaultMessage: 'Search Results'}), renderItem: this.renderPost, keyExtractor: this.keyPostExtractor, - ItemSeparatorComponent: this.renderPostSeparator + ItemSeparatorComponent: this.renderPostSeparator, }); } @@ -603,7 +603,7 @@ class Search extends PureComponent { const searchBarInput = { backgroundColor: changeOpacity(theme.sidebarHeaderTextColor, 0.2), color: theme.sidebarHeaderTextColor, - fontSize: 15 + fontSize: 15, }; return ( @@ -661,7 +661,7 @@ class Search extends PureComponent { const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { return { container: { - flex: 1 + flex: 1, }, header: { backgroundColor: theme.sidebarHeaderBg, @@ -669,100 +669,100 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { ...Platform.select({ android: { height: 46, - justifyContent: 'center' + justifyContent: 'center', }, ios: { - height: 44 - } - }) + height: 44, + }, + }), }, searchBarContainer: { - padding: 0 + padding: 0, }, sectionWrapper: { - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, sectionContainer: { justifyContent: 'center', backgroundColor: changeOpacity(theme.centerChannelColor, 0.07), paddingLeft: 16, - height: SECTION_HEIGHT + height: SECTION_HEIGHT, }, sectionLabel: { color: theme.centerChannelColor, fontSize: 12, - fontWeight: '600' + fontWeight: '600', }, modifierItemContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - height: MODIFIER_LABEL_HEIGHT + height: MODIFIER_LABEL_HEIGHT, }, modifierItemWrapper: { flex: 1, flexDirection: 'column', - paddingHorizontal: 16 + paddingHorizontal: 16, }, modifierItemLabelContainer: { alignItems: 'center', - flexDirection: 'row' + flexDirection: 'row', }, modifierLabelIconContainer: { alignItems: 'center', - marginRight: 5 + marginRight: 5, }, modifierLabelIcon: { fontSize: 16, - color: changeOpacity(theme.centerChannelColor, 0.5) + color: changeOpacity(theme.centerChannelColor, 0.5), }, modifierItemLabel: { fontSize: 14, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, modifierItemDescription: { fontSize: 12, color: changeOpacity(theme.centerChannelColor, 0.5), - marginTop: 5 + marginTop: 5, }, recentItemContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - height: RECENT_LABEL_HEIGHT + height: RECENT_LABEL_HEIGHT, }, recentItemLabel: { color: theme.centerChannelColor, fontSize: 14, height: 20, flex: 1, - paddingHorizontal: 16 + paddingHorizontal: 16, }, recentRemove: { alignItems: 'center', height: RECENT_LABEL_HEIGHT, justifyContent: 'center', - width: 50 + width: 50, }, separatorContainer: { justifyContent: 'center', flex: 1, - height: RECENT_SEPARATOR_HEIGHT + height: RECENT_SEPARATOR_HEIGHT, }, postsSeparator: { - height: 15 + height: 15, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), - height: 1 + height: 1, }, sectionList: { - flex: 1 + flex: 1, }, customItem: { alignItems: 'center', flex: 1, - justifyContent: 'center' + justifyContent: 'center', }, noResults: { color: changeOpacity(theme.centerChannelColor, 0.5), @@ -770,11 +770,11 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { fontWeight: '400', marginTop: 65, textAlign: 'center', - textAlignVertical: 'center' + textAlignVertical: 'center', }, searching: { - marginTop: 65 - } + marginTop: 65, + }, }; }); diff --git a/app/screens/search/search_result_post/index.js b/app/screens/search/search_result_post/index.js index f9d6cbd1c..52a64ee32 100644 --- a/app/screens/search/search_result_post/index.js +++ b/app/screens/search/search_result_post/index.js @@ -12,7 +12,7 @@ function mapStateToProps(state, ownProps) { const post = getPost(state, ownProps.postId); return { - isDeleted: post && post.state === Posts.POST_DELETED + isDeleted: post && post.state === Posts.POST_DELETED, }; } diff --git a/app/screens/search/search_result_post/search_result_post.js b/app/screens/search/search_result_post/search_result_post.js index 3f18c70b7..50ecfad23 100644 --- a/app/screens/search/search_result_post/search_result_post.js +++ b/app/screens/search/search_result_post/search_result_post.js @@ -13,7 +13,7 @@ export default class SearchResultPost extends PureComponent { managedConfig: PropTypes.object.isRequired, navigator: PropTypes.object.isRequired, postId: PropTypes.string.isRequired, - previewPost: PropTypes.func.isRequired + previewPost: PropTypes.func.isRequired, }; render() { diff --git a/app/screens/select_server/index.js b/app/screens/select_server/index.js index c28623883..2bfc63fdb 100644 --- a/app/screens/select_server/index.js +++ b/app/screens/select_server/index.js @@ -26,7 +26,7 @@ function mapStateToProps(state) { latestVersion, license, minVersion, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -38,8 +38,8 @@ function mapDispatchToProps(dispatch) { loadConfigAndLicense, resetPing, setLastUpgradeCheck, - setServerVersion - }, dispatch) + setServerVersion, + }, dispatch), }; } diff --git a/app/screens/select_server/select_server.js b/app/screens/select_server/select_server.js index e1477267b..54c1c6314 100644 --- a/app/screens/select_server/select_server.js +++ b/app/screens/select_server/select_server.js @@ -14,7 +14,7 @@ import { StyleSheet, Text, TouchableWithoutFeedback, - View + View, } from 'react-native'; import Button from 'react-native-button'; import urlParse from 'url-parse'; @@ -41,7 +41,7 @@ class SelectServer extends PureComponent { loadConfigAndLicense: PropTypes.func.isRequired, resetPing: PropTypes.func.isRequired, setLastUpgradeCheck: PropTypes.func.isRequired, - setServerVersion: PropTypes.func.isRequired + setServerVersion: PropTypes.func.isRequired, }).isRequired, allowOtherServers: PropTypes.bool, config: PropTypes.object, @@ -53,7 +53,7 @@ class SelectServer extends PureComponent { minVersion: PropTypes.string, navigator: PropTypes.object, serverUrl: PropTypes.string.isRequired, - theme: PropTypes.object + theme: PropTypes.object, }; constructor(props) { @@ -63,7 +63,7 @@ class SelectServer extends PureComponent { connected: false, connecting: false, error: null, - url: props.serverUrl + url: props.serverUrl, }; this.cancelPing = null; @@ -110,7 +110,7 @@ class SelectServer extends PureComponent { handleNavigatorEvent = (event) => { if (event.id === 'didDisappear') { this.setState({ - connected: false + connected: false, }); } }; @@ -129,12 +129,12 @@ class SelectServer extends PureComponent { statusBarHideWithNavBar: true, navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, - navBarButtonColor: theme.sidebarHeaderTextColor + navBarButtonColor: theme.sidebarHeaderTextColor, }, passProps: { closeAction: () => this.handleLoginOptions(this.props), - upgradeType - } + upgradeType, + }, }); } @@ -168,8 +168,8 @@ class SelectServer extends PureComponent { disabledBackGesture: Config.AutoSelectServerUrl, navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, - navBarButtonColor: theme.sidebarHeaderTextColor - } + navBarButtonColor: theme.sidebarHeaderTextColor, + }, }); this.props.actions.resetPing(); @@ -200,9 +200,9 @@ class SelectServer extends PureComponent { error: { intl: { id: 'mobile.server_url.invalid_format', - defaultMessage: 'URL must start with http:// or https://' - } - } + defaultMessage: 'URL must start with http:// or https://', + }, + }, }); return; @@ -216,13 +216,13 @@ class SelectServer extends PureComponent { getPing, handleServerUrlChanged, loadConfigAndLicense, - setServerVersion + setServerVersion, } = this.props.actions; this.setState({ connected: false, connecting: true, - error: null + error: null, }); Client4.setUrl(url); @@ -234,7 +234,7 @@ class SelectServer extends PureComponent { this.setState({ connected: false, - connecting: false + connecting: false, }); this.cancelPing = null; @@ -253,7 +253,7 @@ class SelectServer extends PureComponent { this.setState({ connected: !result.error, connecting: false, - error: result.error + error: result.error, }); }).catch(() => { if (cancel) { @@ -261,7 +261,7 @@ class SelectServer extends PureComponent { } this.setState({ - connecting: false + connecting: false, }); }); }; @@ -282,7 +282,7 @@ class SelectServer extends PureComponent { connected, connecting, error, - url + url, } = this.state; let buttonIcon; @@ -375,17 +375,17 @@ class SelectServer extends PureComponent { const style = StyleSheet.create({ container: { - flex: 1 + flex: 1, }, disabledInput: { - backgroundColor: '#e3e3e3' + backgroundColor: '#e3e3e3', }, connectButton: { - alignItems: 'center' + alignItems: 'center', }, connectingIndicator: { - marginRight: 5 - } + marginRight: 5, + }, }); export default injectIntl(SelectServer); diff --git a/app/screens/select_team/index.js b/app/screens/select_team/index.js index b8955724d..1f93da429 100644 --- a/app/screens/select_team/index.js +++ b/app/screens/select_team/index.js @@ -27,7 +27,7 @@ function mapStateToProps(state) { teamsRequest: state.requests.teams.getMyTeams, teams: Object.values(getJoinableTeams(state)).sort(sortTeams), currentChannelId: getCurrentChannelId(state), - joinTeamRequest: state.requests.teams.joinTeam + joinTeamRequest: state.requests.teams.joinTeam, }; } @@ -37,8 +37,8 @@ function mapDispatchToProps(dispatch) { handleTeamChange, joinTeam, logout, - markChannelAsRead - }, dispatch) + markChannelAsRead, + }, dispatch), }; } diff --git a/app/screens/select_team/select_team.js b/app/screens/select_team/select_team.js index 83bd8c235..b46397bdf 100644 --- a/app/screens/select_team/select_team.js +++ b/app/screens/select_team/select_team.js @@ -10,7 +10,7 @@ import { StyleSheet, Text, TouchableOpacity, - View + View, } from 'react-native'; import {RequestStatus} from 'mattermost-redux/constants'; @@ -31,7 +31,7 @@ export default class SelectTeam extends PureComponent { handleTeamChange: PropTypes.func.isRequired, joinTeam: PropTypes.func.isRequired, logout: PropTypes.func.isRequired, - markChannelAsRead: PropTypes.func.isRequired + markChannelAsRead: PropTypes.func.isRequired, }).isRequired, currentChannelId: PropTypes.string, currentUrl: PropTypes.string.isRequired, @@ -39,7 +39,7 @@ export default class SelectTeam extends PureComponent { navigator: PropTypes.object, userWithoutTeams: PropTypes.bool, teams: PropTypes.array.isRequired, - theme: PropTypes.object + theme: PropTypes.object, }; constructor(props) { @@ -48,7 +48,7 @@ export default class SelectTeam extends PureComponent { this.state = { joining: false, - teams: null + teams: null, }; } @@ -77,7 +77,7 @@ export default class SelectTeam extends PureComponent { } else { const teams = [{ id: 'mobile.select_team.no_teams', - defaultMessage: 'There are no available teams for you to join.' + defaultMessage: 'There are no available teams for you to join.', }]; this.setState({teams}); } @@ -85,7 +85,7 @@ export default class SelectTeam extends PureComponent { close = () => { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); }; @@ -99,8 +99,8 @@ export default class SelectTeam extends PureComponent { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }; @@ -125,7 +125,7 @@ export default class SelectTeam extends PureComponent { const { joinTeam, handleTeamChange, - markChannelAsRead + markChannelAsRead, } = this.props.actions; if (currentChannelId) { @@ -238,34 +238,34 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { backgroundColor: theme.centerChannelBg, - flex: 1 + flex: 1, }, headingContainer: { alignItems: 'center', flexDirection: 'row', marginHorizontal: 16, - marginTop: 20 + marginTop: 20, }, headingWrapper: { - marginRight: 15 + marginRight: 15, }, heading: { color: changeOpacity(theme.centerChannelColor, 0.5), - fontSize: 13 + fontSize: 13, }, line: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), width: '100%', - height: StyleSheet.hairlineWidth + height: StyleSheet.hairlineWidth, }, teamWrapper: { - marginTop: 20 + marginTop: 20, }, teamContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - marginHorizontal: 16 + marginHorizontal: 16, }, teamIconContainer: { alignItems: 'center', @@ -273,30 +273,30 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderRadius: 2, height: 40, justifyContent: 'center', - width: 40 + width: 40, }, noTeam: { color: theme.centerChannelColor, - fontSize: 14 + fontSize: 14, }, teamIcon: { color: theme.buttonColor, fontFamily: 'OpenSans', fontSize: 18, - fontWeight: '600' + fontWeight: '600', }, teamNameContainer: { flex: 1, flexDirection: 'column', - marginLeft: 10 + marginLeft: 10, }, teamName: { color: theme.centerChannelColor, - fontSize: 18 + fontSize: 18, }, teamUrl: { color: changeOpacity(theme.centerChannelColor, 0.5), - fontSize: 12 - } + fontSize: 12, + }, }; }); diff --git a/app/screens/settings/advanced_settings/advanced_settings.js b/app/screens/settings/advanced_settings/advanced_settings.js index ac767c977..d953ae3bc 100644 --- a/app/screens/settings/advanced_settings/advanced_settings.js +++ b/app/screens/settings/advanced_settings/advanced_settings.js @@ -10,7 +10,7 @@ import { Platform, ScrollView, Text, - View + View, } from 'react-native'; import {Sentry} from 'react-native-sentry'; @@ -27,15 +27,15 @@ import Config from 'assets/config'; class AdvancedSettings extends PureComponent { static propTypes = { actions: PropTypes.shape({ - purgeOfflineStore: PropTypes.func.isRequired + purgeOfflineStore: PropTypes.func.isRequired, }).isRequired, intl: intlShape.isRequired, - theme: PropTypes.object + theme: PropTypes.object, }; state = { cacheSize: null, - cacheSizedFetched: false + cacheSizedFetched: false, }; componentDidMount() { @@ -50,10 +50,10 @@ class AdvancedSettings extends PureComponent { intl.formatMessage({id: 'mobile.advanced_settings.reset_message', defaultMessage: '\nThis will reset all offline data and restart the app. You will be automatically logged back in once the app restarts.\n'}), [{ text: intl.formatMessage({id: 'mobile.advanced_settings.reset_button', defaultMessage: 'Reset'}), - onPress: () => actions.purgeOfflineStore() + onPress: () => actions.purgeOfflineStore(), }, { text: intl.formatMessage({id: 'channel_modal.cancel', defaultMessage: 'Cancel'}), - onPress: () => true + onPress: () => true, }] ); }); @@ -66,11 +66,11 @@ class AdvancedSettings extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.advanced_settings.delete_file_cache', - defaultMessage: 'Delete File Cache' + defaultMessage: 'Delete File Cache', }), intl.formatMessage({ id: 'mobile.advanced_settings.delete_file_cache_message', - defaultMessage: '\nThis will delete all the files stored in the cache. Are you sure you want to delete them?\n' + defaultMessage: '\nThis will delete all the files stored in the cache. Are you sure you want to delete them?\n', }), [{ text: intl.formatMessage({id: 'mobile.advanced_settings.delete', defaultMessage: 'Delete'}), @@ -79,10 +79,10 @@ class AdvancedSettings extends PureComponent { await deleteFileCache(); this.setState({cacheSize: 0, cacheSizedFetched: true}); }); - } + }, }, { text: intl.formatMessage({id: 'channel_modal.cancel', defaultMessage: 'Cancel'}), - onPress: () => true + onPress: () => true, }] ); } @@ -197,26 +197,26 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), ...Platform.select({ ios: { - paddingTop: 35 - } - }) + paddingTop: 35, + }, + }), }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), - height: 1 + height: 1, }, cacheSize: { color: theme.centerChannelColor, flex: 1, fontSize: 14, - lineHeight: 43 - } + lineHeight: 43, + }, }; }); diff --git a/app/screens/settings/advanced_settings/index.js b/app/screens/settings/advanced_settings/index.js index 59c43d476..7e1bc7f4c 100644 --- a/app/screens/settings/advanced_settings/index.js +++ b/app/screens/settings/advanced_settings/index.js @@ -11,15 +11,15 @@ import AdvancedSettings from './advanced_settings'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - purgeOfflineStore - }, dispatch) + purgeOfflineStore, + }, dispatch), }; } diff --git a/app/screens/settings/display_settings/display_settings.js b/app/screens/settings/display_settings/display_settings.js index 6afe6c9b4..81319b2fb 100644 --- a/app/screens/settings/display_settings/display_settings.js +++ b/app/screens/settings/display_settings/display_settings.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {intlShape} from 'react-intl'; import { Platform, - View + View, } from 'react-native'; import SettingsItem from 'app/screens/settings/settings_item'; @@ -19,15 +19,15 @@ import ClockDisplay from 'app/screens/clock_display'; export default class DisplaySettings extends PureComponent { static propTypes = { navigator: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape.isRequired + intl: intlShape.isRequired, }; state = { - showClockDisplaySettings: false + showClockDisplaySettings: false, }; goToClockDisplaySettings = wrapWithPreventDoubleTap(() => { @@ -44,8 +44,8 @@ export default class DisplaySettings extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); return; } @@ -99,20 +99,20 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), flex: 1, ...Platform.select({ ios: { - paddingTop: 35 - } - }) + paddingTop: 35, + }, + }), }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), - height: 1 - } + height: 1, + }, }; }); diff --git a/app/screens/settings/display_settings/index.js b/app/screens/settings/display_settings/index.js index dafb1276d..07c895f16 100644 --- a/app/screens/settings/display_settings/index.js +++ b/app/screens/settings/display_settings/index.js @@ -9,7 +9,7 @@ import DisplaySettings from './display_settings'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/settings/general/index.js b/app/screens/settings/general/index.js index ce7cc36bd..b0c779ac2 100644 --- a/app/screens/settings/general/index.js +++ b/app/screens/settings/general/index.js @@ -24,7 +24,7 @@ function mapStateToProps(state) { currentUserId: state.entities.users.currentUserId, currentTeamId: state.entities.teams.currentTeamId, currentUrl: removeProtocol(getCurrentUrl(state)), - joinableTeams: getJoinableTeams(state) + joinableTeams: getJoinableTeams(state), }; } @@ -32,8 +32,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ clearErrors, - purgeOfflineStore - }, dispatch) + purgeOfflineStore, + }, dispatch), }; } diff --git a/app/screens/settings/general/settings.js b/app/screens/settings/general/settings.js index 828d9b14e..fd0fc4859 100644 --- a/app/screens/settings/general/settings.js +++ b/app/screens/settings/general/settings.js @@ -8,7 +8,7 @@ import { Linking, Platform, ScrollView, - View + View, } from 'react-native'; import DeviceInfo from 'react-native-device-info'; @@ -24,7 +24,7 @@ class Settings extends PureComponent { static propTypes = { actions: PropTypes.shape({ clearErrors: PropTypes.func.isRequired, - purgeOfflineStore: PropTypes.func.isRequired + purgeOfflineStore: PropTypes.func.isRequired, }).isRequired, config: PropTypes.object.isRequired, currentTeamId: PropTypes.string.isRequired, @@ -34,7 +34,7 @@ class Settings extends PureComponent { intl: intlShape.isRequired, joinableTeams: PropTypes.object.isRequired, navigator: PropTypes.object, - theme: PropTypes.object + theme: PropTypes.object, }; constructor(props) { @@ -56,7 +56,7 @@ class Settings extends PureComponent { `Current Team Id: ${currentTeamId}`, `Server Version: ${config.Version} (Build ${config.BuildNumber})`, `App Version: ${DeviceInfo.getVersion()} (Build ${DeviceInfo.getBuildNumber()})`, - `App Platform: ${Platform.OS}` + `App Platform: ${Platform.OS}`, ]; if (errors.length) { const errorArray = errors.map((e) => { @@ -68,7 +68,7 @@ class Settings extends PureComponent { contents = contents.concat([ '', 'Errors:', - errorArray + errorArray, ]); } return contents.join('\n'); @@ -84,8 +84,8 @@ class Settings extends PureComponent { navigatorStyle: { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, - navBarButtonColor: theme.sidebarHeaderTextColor - } + navBarButtonColor: theme.sidebarHeaderTextColor, + }, }); }); @@ -100,8 +100,8 @@ class Settings extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); @@ -116,8 +116,8 @@ class Settings extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); @@ -132,8 +132,8 @@ class Settings extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg - } + screenBackgroundColor: theme.centerChannelBg, + }, }); }); @@ -149,12 +149,12 @@ class Settings extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { currentUrl, - theme - } + theme, + }, }); }); @@ -170,11 +170,11 @@ class Settings extends PureComponent { navBarHidden: false, navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, - navBarButtonColor: theme.sidebarHeaderTextColor + navBarButtonColor: theme.sidebarHeaderTextColor, }, passProps: { - userCheckedForUpgrade: true - } + userCheckedForUpgrade: true, + }, }); }); @@ -182,7 +182,7 @@ class Settings extends PureComponent { if (event.type === 'NavBarButtonPress') { if (event.id === 'close-settings') { this.props.navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); } } @@ -318,20 +318,20 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), ...Platform.select({ ios: { - paddingTop: 35 - } - }) + paddingTop: 35, + }, + }), }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), - height: 1 - } + height: 1, + }, }; }); diff --git a/app/screens/settings/notification_settings/index.js b/app/screens/settings/notification_settings/index.js index cb6815c4b..2e33a37f5 100644 --- a/app/screens/settings/notification_settings/index.js +++ b/app/screens/settings/notification_settings/index.js @@ -17,15 +17,15 @@ function mapStateToProps(state) { currentUser: getCurrentUser(state), myPreferences: getMyPreferences(state), updateMeRequest: state.requests.users.updateMe, - theme: getTheme(state) + theme: getTheme(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - handleUpdateUserNotifyProps - }, dispatch) + handleUpdateUserNotifyProps, + }, dispatch), }; } diff --git a/app/screens/settings/notification_settings/notification_settings.js b/app/screens/settings/notification_settings/notification_settings.js index ea06aef21..e02b102bd 100644 --- a/app/screens/settings/notification_settings/notification_settings.js +++ b/app/screens/settings/notification_settings/notification_settings.js @@ -10,7 +10,7 @@ import { Platform, ScrollView, TouchableOpacity, - View + View, } from 'react-native'; import deepEqual from 'deep-equal'; @@ -29,7 +29,7 @@ import {changeOpacity, makeStyleSheetFromTheme, setNavigatorStyles} from 'app/ut class NotificationSettings extends PureComponent { static propTypes = { actions: PropTypes.shape({ - handleUpdateUserNotifyProps: PropTypes.func.isRequired + handleUpdateUserNotifyProps: PropTypes.func.isRequired, }), config: PropTypes.object.isRequired, currentUser: PropTypes.object.isRequired, @@ -37,11 +37,11 @@ class NotificationSettings extends PureComponent { myPreferences: PropTypes.object.isRequired, navigator: PropTypes.object, theme: PropTypes.object.isRequired, - updateMeRequest: PropTypes.object.isRequired + updateMeRequest: PropTypes.object.isRequired, }; state = { - showEmailNotificationsModal: false + showEmailNotificationsModal: false, }; componentWillReceiveProps(nextProps) { @@ -54,11 +54,11 @@ class NotificationSettings extends PureComponent { Alert.alert( intl.formatMessage({ id: 'mobile.notification_settings.save_failed_title', - defaultMessage: 'Connection issue' + defaultMessage: 'Connection issue', }), intl.formatMessage({ id: 'mobile.notification_settings.save_failed_description', - defaultMessage: 'The notification settings failed to save due to a connection issue, please try again.' + defaultMessage: 'The notification settings failed to save due to a connection issue, please try again.', }) ); } @@ -76,19 +76,19 @@ class NotificationSettings extends PureComponent { screen: 'NotificationSettingsEmail', title: intl.formatMessage({ id: 'mobile.notification_settings.email_title', - defaultMessage: 'Email Notifications' + defaultMessage: 'Email Notifications', }), animated: true, navigatorStyle: { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { currentUser, - onBack: this.saveNotificationProps - } + onBack: this.saveNotificationProps, + }, }); } else { this.setState({showEmailNotificationsModal: true}); @@ -106,12 +106,12 @@ class NotificationSettings extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { currentUser, - onBack: this.saveNotificationProps - } + onBack: this.saveNotificationProps, + }, }); }; @@ -129,13 +129,13 @@ class NotificationSettings extends PureComponent { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { currentUser, onBack: this.saveNotificationProps, - notificationPreferences - } + notificationPreferences, + }, }); }); }).catch((e) => { @@ -166,7 +166,7 @@ class NotificationSettings extends PureComponent { this.saveNotificationProps({ ...getNotificationProps(currentUser), email, - interval + interval, }); } }; @@ -176,7 +176,7 @@ class NotificationSettings extends PureComponent { const {user_id: userId} = notifyProps; const previousProps = { ...getNotificationProps(currentUser), - user_id: userId + user_id: userId, }; if (notifyProps.interval) { @@ -234,37 +234,37 @@ class NotificationSettings extends PureComponent { const emailOptions = [{ label: intl.formatMessage({ id: 'user.settings.notifications.email.immediately', - defaultMessage: 'Immediately' + defaultMessage: 'Immediately', }), value: sendImmediatleyValue, - checked: sendImmediatley + checked: sendImmediatley, }]; if (emailBatchingEnabled) { emailOptions.push({ label: intl.formatMessage({ id: 'user.settings.notifications.email.everyXMinutes', - defaultMessage: 'Every {count, plural, one {minute} other {{count, number} minutes}}' + defaultMessage: 'Every {count, plural, one {minute} other {{count, number} minutes}}', }, {count: Preferences.INTERVAL_FIFTEEN_MINUTES / 60}), value: Preferences.INTERVAL_FIFTEEN_MINUTES.toString(), - checked: fifteenMinutes + checked: fifteenMinutes, }, { label: intl.formatMessage({ id: 'user.settings.notifications.email.everyHour', - defaultMessage: 'Every hour' + defaultMessage: 'Every hour', }), value: Preferences.INTERVAL_HOUR.toString(), - checked: hourly + checked: hourly, }); } emailOptions.push({ label: intl.formatMessage({ id: 'user.settings.notifications.email.never', - defaultMessage: 'Never' + defaultMessage: 'Never', }), value: 'false', - checked: never + checked: never, }); return ( @@ -391,75 +391,75 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), ...Platform.select({ ios: { - paddingTop: 35 - } - }) + paddingTop: 35, + }, + }), }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), height: 1, - width: '100%' + width: '100%', }, modalOverlay: { backgroundColor: changeOpacity('#000000', 0.6), alignItems: 'center', - flex: 1 + flex: 1, }, modal: { backgroundColor: theme.centerChannelBg, borderRadius: 4, marginTop: 20, - width: '95%' + width: '95%', }, modalBody: { - paddingHorizontal: 24 + paddingHorizontal: 24, }, modalTitleContainer: { marginBottom: 30, - marginTop: 20 + marginTop: 20, }, modalTitle: { color: theme.centerChannelColor, - fontSize: 19 + fontSize: 19, }, modalOptionDisabled: { color: changeOpacity(theme.centerChannelColor, 0.5), - fontSize: 17 + fontSize: 17, }, modalHelpText: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 13, - marginTop: 20 + marginTop: 20, }, modalFooter: { alignItems: 'flex-end', height: 58, marginTop: 40, - width: '100%' + width: '100%', }, modalFooterContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - paddingRight: 24 + paddingRight: 24, }, modalFooterOptionContainer: { alignItems: 'center', height: 40, justifyContent: 'center', paddingHorizontal: 10, - paddingVertical: 5 + paddingVertical: 5, }, modalFooterOption: { color: theme.linkColor, - fontSize: 14 - } + fontSize: 14, + }, }; }); diff --git a/app/screens/settings/notification_settings_email/index.js b/app/screens/settings/notification_settings_email/index.js index 7cc8d7e5f..b2f6db059 100644 --- a/app/screens/settings/notification_settings_email/index.js +++ b/app/screens/settings/notification_settings_email/index.js @@ -12,7 +12,7 @@ function mapStateToProps(state) { return { config: getConfig(state), myPreferences: getMyPreferences(state), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/settings/notification_settings_email/notification_settings_email.js b/app/screens/settings/notification_settings_email/notification_settings_email.js index 9738578e1..84a3859a8 100644 --- a/app/screens/settings/notification_settings_email/notification_settings_email.js +++ b/app/screens/settings/notification_settings_email/notification_settings_email.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { ScrollView, - View + View, } from 'react-native'; import {Preferences} from 'mattermost-redux/constants'; @@ -27,7 +27,7 @@ export default class NotificationSettingsEmail extends PureComponent { myPreferences: PropTypes.object.isRequired, navigator: PropTypes.object, onBack: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; constructor(props) { @@ -69,7 +69,7 @@ export default class NotificationSettingsEmail extends PureComponent { this.setState({ email, - interval + interval, }); }; @@ -85,14 +85,14 @@ export default class NotificationSettingsEmail extends PureComponent { return { ...notifyProps, - interval + interval, }; }; saveUserNotifyProps = () => { this.props.onBack({ ...this.state, - user_id: this.props.currentUser.id + user_id: this.props.currentUser.id, }); }; @@ -225,31 +225,31 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, input: { color: theme.centerChannelColor, fontSize: 12, - height: 40 + height: 40, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), flex: 1, height: 1, - marginLeft: 15 + marginLeft: 15, }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.06) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), }, scrollViewContent: { - paddingVertical: 35 + paddingVertical: 35, }, disabled: { color: theme.centerChannelColor, fontSize: 15, paddingHorizontal: 15, - paddingVertical: 10 - } + paddingVertical: 10, + }, }; }); diff --git a/app/screens/settings/notification_settings_mentions/index.js b/app/screens/settings/notification_settings_mentions/index.js index 2f9bd1852..867751553 100644 --- a/app/screens/settings/notification_settings_mentions/index.js +++ b/app/screens/settings/notification_settings_mentions/index.js @@ -9,7 +9,7 @@ import NotificationSettingsMentions from './notification_settings_mentions'; function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/settings/notification_settings_mentions/notification_settings_mention_base.js b/app/screens/settings/notification_settings_mentions/notification_settings_mention_base.js index 9b54a9387..dc1c6a588 100644 --- a/app/screens/settings/notification_settings_mentions/notification_settings_mention_base.js +++ b/app/screens/settings/notification_settings_mentions/notification_settings_mention_base.js @@ -14,7 +14,7 @@ export default class NotificationSettingsMentionsBase extends PureComponent { intl: intlShape.isRequired, navigator: PropTypes.object, onBack: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; constructor(props) { @@ -60,7 +60,7 @@ export default class NotificationSettingsMentionsBase extends PureComponent { usernameMention: usernameMentionIndex > -1, mention_keys: mentionKeys.join(','), showKeywordsModal: false, - showReplyModal: false + showReplyModal: false, }; this.keywords = newState.mention_keys; @@ -71,19 +71,19 @@ export default class NotificationSettingsMentionsBase extends PureComponent { toggleFirstNameMention = () => { this.setState({ - first_name: (!(this.state.first_name === 'true')).toString() + first_name: (!(this.state.first_name === 'true')).toString(), }); }; toggleUsernameMention = () => { this.setState({ - usernameMention: !this.state.usernameMention + usernameMention: !this.state.usernameMention, }); }; toggleChannelMentions = () => { this.setState({ - channel: (!(this.state.channel === 'true')).toString() + channel: (!(this.state.channel === 'true')).toString(), }); }; @@ -91,14 +91,14 @@ export default class NotificationSettingsMentionsBase extends PureComponent { this.goingBack = true; this.setState({ mention_keys: text, - showKeywordsModal: false + showKeywordsModal: false, }); }; setReplyNotifications = (value) => { this.setState({ comments: value, - showReplyModal: false + showReplyModal: false, }); }; @@ -122,7 +122,7 @@ export default class NotificationSettingsMentionsBase extends PureComponent { this.props.onBack({ ...notifyProps, mention_keys: mentionKeys, - user_id: this.props.currentUser.id + user_id: this.props.currentUser.id, }); }; } diff --git a/app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js b/app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js index f98cbf74c..8f701ee21 100644 --- a/app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js +++ b/app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js @@ -7,7 +7,7 @@ import { ScrollView, Text, TouchableOpacity, - View + View, } from 'react-native'; import {injectIntl} from 'react-intl'; @@ -117,24 +117,24 @@ class NotificationSettingsMentionsIos extends NotificationSettingsMentionsBase { const options = [{ label: intl.formatMessage({ id: 'mobile.account_notifications.threads_start_participate', - defaultMessage: 'Threads that I start or participate in' + defaultMessage: 'Threads that I start or participate in', }), value: 'any', - checked: this.state.comments === 'any' + checked: this.state.comments === 'any', }, { label: intl.formatMessage({ id: 'mobile.account_notifications.threads_start', - defaultMessage: 'Threads that I start' + defaultMessage: 'Threads that I start', }), value: 'root', - checked: this.state.comments === 'root' + checked: this.state.comments === 'root', }, { label: intl.formatMessage({ id: 'mobile.account_notifications.threads_mentions', - defaultMessage: 'Mentions in threads' + defaultMessage: 'Mentions in threads', }), value: 'never', - checked: this.state.comments === 'never' + checked: this.state.comments === 'never', }]; return ( @@ -362,83 +362,83 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, input: { color: theme.centerChannelColor, fontSize: 12, - height: 40 + height: 40, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), height: 1, - width: '100%' + width: '100%', }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.06) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), }, scrollViewContent: { - paddingVertical: 0 + paddingVertical: 0, }, modalOverlay: { backgroundColor: changeOpacity('#000000', 0.6), alignItems: 'center', - flex: 1 + flex: 1, }, modal: { backgroundColor: theme.centerChannelBg, borderRadius: 4, marginTop: 20, - width: '95%' + width: '95%', }, modalBody: { - paddingHorizontal: 24 + paddingHorizontal: 24, }, modalTitleContainer: { marginBottom: 30, - marginTop: 20 + marginTop: 20, }, modalTitle: { color: theme.centerChannelColor, - fontSize: 19 + fontSize: 19, }, modalOptionDisabled: { color: changeOpacity(theme.centerChannelColor, 0.5), - fontSize: 17 + fontSize: 17, }, modalInput: { color: theme.centerChannelColor, - fontSize: 19 + fontSize: 19, }, modalHelpText: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 13, - marginTop: 20 + marginTop: 20, }, modalFooter: { alignItems: 'flex-end', height: 58, marginTop: 40, - width: '100%' + width: '100%', }, modalFooterContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - paddingRight: 24 + paddingRight: 24, }, modalFooterOptionContainer: { alignItems: 'center', height: 40, justifyContent: 'center', paddingHorizontal: 10, - paddingVertical: 5 + paddingVertical: 5, }, modalFooterOption: { color: theme.linkColor, - fontSize: 14 - } + fontSize: 14, + }, }; }); diff --git a/app/screens/settings/notification_settings_mentions/notification_settings_mentions.ios.js b/app/screens/settings/notification_settings_mentions/notification_settings_mentions.ios.js index ae0abacf6..03782cae6 100644 --- a/app/screens/settings/notification_settings_mentions/notification_settings_mentions.ios.js +++ b/app/screens/settings/notification_settings_mentions/notification_settings_mentions.ios.js @@ -5,7 +5,7 @@ import React from 'react'; import { ScrollView, Text, - View + View, } from 'react-native'; import {injectIntl} from 'react-intl'; @@ -31,12 +31,12 @@ class NotificationSettingsMentionsIos extends NotificationSettingsMentionsBase { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }, passProps: { keywords: this.state.mention_keys, - onBack: this.updateMentionKeys - } + onBack: this.updateMentionKeys, + }, }); }; @@ -213,26 +213,26 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, input: { color: theme.centerChannelColor, fontSize: 12, - height: 40 + height: 40, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), flex: 1, height: 1, - marginLeft: 15 + marginLeft: 15, }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.06) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), }, scrollViewContent: { - paddingVertical: 35 - } + paddingVertical: 35, + }, }; }); diff --git a/app/screens/settings/notification_settings_mentions_keywords/index.js b/app/screens/settings/notification_settings_mentions_keywords/index.js index 3688c0986..bac550753 100644 --- a/app/screens/settings/notification_settings_mentions_keywords/index.js +++ b/app/screens/settings/notification_settings_mentions_keywords/index.js @@ -9,7 +9,7 @@ import NotificationSettingsMentionsKeywords from './notification_settings_mentio function mapStateToProps(state) { return { - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/settings/notification_settings_mentions_keywords/notification_settings_mentions_keywords.js b/app/screens/settings/notification_settings_mentions_keywords/notification_settings_mentions_keywords.js index e6e30a633..c3192dc87 100644 --- a/app/screens/settings/notification_settings_mentions_keywords/notification_settings_mentions_keywords.js +++ b/app/screens/settings/notification_settings_mentions_keywords/notification_settings_mentions_keywords.js @@ -14,14 +14,14 @@ export default class NotificationSettingsMentionsKeywords extends PureComponent keywords: PropTypes.string, navigator: PropTypes.object, onBack: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; constructor(props) { super(props); this.state = { - keywords: props.keywords + keywords: props.keywords, }; props.navigator.setOnNavigatorEvent(this.onNavigatorEvent); @@ -106,33 +106,33 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), - paddingTop: 35 + paddingTop: 35, }, inputContainer: { borderTopWidth: 1, borderBottomWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.1), borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1), - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, input: { color: theme.centerChannelColor, fontSize: 15, height: 150, paddingHorizontal: 15, - paddingVertical: 10 + paddingVertical: 10, }, helpContainer: { marginTop: 10, - paddingHorizontal: 15 + paddingHorizontal: 15, }, help: { color: changeOpacity(theme.centerChannelColor, 0.4), - fontSize: 13 - } + fontSize: 13, + }, }; }); diff --git a/app/screens/settings/notification_settings_mobile/index.js b/app/screens/settings/notification_settings_mobile/index.js index 7de73d3bd..e798253f5 100644 --- a/app/screens/settings/notification_settings_mobile/index.js +++ b/app/screens/settings/notification_settings_mobile/index.js @@ -12,7 +12,7 @@ import NotificationSettingsMobile from './notification_settings_mobile'; function mapStateToProps(state) { return { config: getConfig(state), - theme: getTheme(state) + theme: getTheme(state), }; } diff --git a/app/screens/settings/notification_settings_mobile/notification_settings_mobile.android.js b/app/screens/settings/notification_settings_mobile/notification_settings_mobile.android.js index ff578157d..cdac3d889 100644 --- a/app/screens/settings/notification_settings_mobile/notification_settings_mobile.android.js +++ b/app/screens/settings/notification_settings_mobile/notification_settings_mobile.android.js @@ -8,7 +8,7 @@ import { ScrollView, Text, TouchableOpacity, - View + View, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -87,24 +87,24 @@ class NotificationSettingsMobileAndroid extends NotificationSettingsMobileBase { const options = [{ label: intl.formatMessage({ id: 'user.settings.notifications.allActivity', - defaultMessage: 'For all activity' + defaultMessage: 'For all activity', }), value: 'all', - checked: this.state.push === 'all' + checked: this.state.push === 'all', }, { label: intl.formatMessage({ id: 'user.settings.notifications.onlyMentions', - defaultMessage: 'Only for mentions and direct messages' + defaultMessage: 'Only for mentions and direct messages', }), value: 'mention', - checked: this.state.push === 'mention' + checked: this.state.push === 'mention', }, { label: intl.formatMessage({ id: 'user.settings.notifications.never', - defaultMessage: 'Never' + defaultMessage: 'Never', }), value: 'none', - checked: this.state.push === 'none' + checked: this.state.push === 'none', }]; return ( @@ -181,24 +181,24 @@ class NotificationSettingsMobileAndroid extends NotificationSettingsMobileBase { const options = [{ label: intl.formatMessage({ id: 'user.settings.push_notification.online', - defaultMessage: 'Online, away or offline' + defaultMessage: 'Online, away or offline', }), value: 'online', - checked: this.state.push_status === 'online' + checked: this.state.push_status === 'online', }, { label: intl.formatMessage({ id: 'user.settings.push_notification.away', - defaultMessage: 'Away or offline' + defaultMessage: 'Away or offline', }), value: 'away', - checked: this.state.push_status === 'away' + checked: this.state.push_status === 'away', }, { label: intl.formatMessage({ id: 'user.settings.push_notification.offline', - defaultMessage: 'Offline' + defaultMessage: 'Offline', }), value: 'offline', - checked: this.state.push_status === 'offline' + checked: this.state.push_status === 'offline', }]; return ( @@ -263,17 +263,17 @@ class NotificationSettingsMobileAndroid extends NotificationSettingsMobileBase { const soundsArray = [{ label: intl.formatMessage({ id: 'mobile.notification_settings_mobile.default_sound', - defaultMessage: 'Default ({sound})' + defaultMessage: 'Default ({sound})', }, {sound: defaultSound}), value: defaultUri, - checked: selectedUri === null + checked: selectedUri === null, }, { label: intl.formatMessage({ id: 'mobile.notification_settings_mobile.no_sound', - defaultMessage: 'None' + defaultMessage: 'None', }), value: 'none', - checked: selectedUri === 'none' + checked: selectedUri === 'none', }]; if (sounds && sounds.length) { @@ -281,7 +281,7 @@ class NotificationSettingsMobileAndroid extends NotificationSettingsMobileBase { return { label: s.name, value: s.uri, - checked: s.uri === selectedUri + checked: s.uri === selectedUri, }; }); soundsArray.push(...filteredSounds); @@ -478,7 +478,7 @@ class NotificationSettingsMobileAndroid extends NotificationSettingsMobileBase { id='mobile.notification_settings_mobile.default_sound' defaultMessage='Default ({sound})' values={{ - sound: defaultSound + sound: defaultSound, }} /> ); @@ -580,7 +580,7 @@ class NotificationSettingsMobileAndroid extends NotificationSettingsMobileBase { selectedUri = this.sound; sound = intl.formatMessage({ id: 'mobile.notification_settings_mobile.no_sound', - defaultMessage: 'None' + defaultMessage: 'None', }); } else { selectedUri = this.sound; @@ -598,12 +598,12 @@ class NotificationSettingsMobileAndroid extends NotificationSettingsMobileBase { PushNotifications.localNotification({ message: intl.formatMessage({ id: 'mobile.notification_settings_mobile.test_push', - defaultMessage: 'This is a test push notification' + defaultMessage: 'This is a test push notification', }), userInfo: { localNotification: true, - localTest: true - } + localTest: true, + }, }); }; @@ -661,75 +661,75 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, input: { color: theme.centerChannelColor, fontSize: 12, - height: 40 + height: 40, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), height: 1, - width: '100%' + width: '100%', }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.06) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), }, scrollViewContent: { - paddingVertical: 0 + paddingVertical: 0, }, modalOverlay: { backgroundColor: changeOpacity('#000000', 0.6), alignItems: 'center', - flex: 1 + flex: 1, }, modal: { backgroundColor: theme.centerChannelBg, borderRadius: 4, marginTop: 20, - width: '95%' + width: '95%', }, modalBody: { maxHeight: '80%', - paddingHorizontal: 24 + paddingHorizontal: 24, }, modalTitleContainer: { marginBottom: 30, - marginTop: 20 + marginTop: 20, }, modalTitle: { color: theme.centerChannelColor, - fontSize: 19 + fontSize: 19, }, modalOptionDisabled: { color: changeOpacity(theme.centerChannelColor, 0.5), - fontSize: 17 + fontSize: 17, }, modalFooter: { alignItems: 'flex-end', height: 58, marginTop: 40, - width: '100%' + width: '100%', }, modalFooterContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - paddingRight: 24 + paddingRight: 24, }, modalFooterOptionContainer: { alignItems: 'center', height: 40, justifyContent: 'center', paddingHorizontal: 10, - paddingVertical: 5 + paddingVertical: 5, }, modalFooterOption: { color: theme.linkColor, - fontSize: 14 - } + fontSize: 14, + }, }; }); diff --git a/app/screens/settings/notification_settings_mobile/notification_settings_mobile.ios.js b/app/screens/settings/notification_settings_mobile/notification_settings_mobile.ios.js index 47e834e3d..6e570b6d0 100644 --- a/app/screens/settings/notification_settings_mobile/notification_settings_mobile.ios.js +++ b/app/screens/settings/notification_settings_mobile/notification_settings_mobile.ios.js @@ -5,7 +5,7 @@ import React from 'react'; import {injectIntl} from 'react-intl'; import { ScrollView, - View + View, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -167,32 +167,32 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, input: { color: theme.centerChannelColor, fontSize: 12, - height: 40 + height: 40, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), flex: 1, height: 1, - marginLeft: 15 + marginLeft: 15, }, scrollView: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.06) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.06), }, scrollViewContent: { - paddingVertical: 35 + paddingVertical: 35, }, disabled: { color: theme.centerChannelColor, fontSize: 15, paddingHorizontal: 15, - paddingVertical: 10 - } + paddingVertical: 10, + }, }; }); diff --git a/app/screens/settings/notification_settings_mobile/notification_settings_mobile_base.js b/app/screens/settings/notification_settings_mobile/notification_settings_mobile_base.js index b86c2722f..79a9f30a8 100644 --- a/app/screens/settings/notification_settings_mobile/notification_settings_mobile_base.js +++ b/app/screens/settings/notification_settings_mobile/notification_settings_mobile_base.js @@ -17,7 +17,7 @@ export default class NotificationSettingsMobileBase extends PureComponent { navigator: PropTypes.object, notificationPreferences: PropTypes.object, onBack: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; constructor(props) { @@ -31,7 +31,7 @@ export default class NotificationSettingsMobileBase extends PureComponent { ...this.getNotificationPreferences(props), showMobilePushModal: false, showMobilePushStatusModal: false, - showMobileSoundsModal: false + showMobileSoundsModal: false, }; this.push = this.state.push; this.pushStatus = this.state.push_status; @@ -51,7 +51,7 @@ export default class NotificationSettingsMobileBase extends PureComponent { shouldBlink, shouldVibrate, selectedUri, - sounds + sounds, } = props.notificationPreferences; const defSound = sounds.find((s) => s.uri === defaultUri); @@ -70,7 +70,7 @@ export default class NotificationSettingsMobileBase extends PureComponent { shouldVibrate, shouldBlink, selectedUri, - sound + sound, }; } @@ -105,7 +105,7 @@ export default class NotificationSettingsMobileBase extends PureComponent { first_name: firstName, mention_keys: mentionKeys, push, - push_status: pushStatus + push_status: pushStatus, } = this.state; this.props.onBack({ @@ -118,7 +118,7 @@ export default class NotificationSettingsMobileBase extends PureComponent { mention_keys: mentionKeys, push, push_status: pushStatus, - user_id: this.props.currentUser.id + user_id: this.props.currentUser.id, }); }; } diff --git a/app/screens/settings/section.js b/app/screens/settings/section.js index 5423de108..5ea108a26 100644 --- a/app/screens/settings/section.js +++ b/app/screens/settings/section.js @@ -4,7 +4,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { - View + View, } from 'react-native'; import FormattedText from 'app/components/formatted_text'; @@ -21,7 +21,7 @@ function section(props) { headerDefaultMessage, headerId, headerValues, - theme + theme, } = props; const style = getStyleSheet(theme); @@ -61,33 +61,33 @@ section.propTypes = { headerDefaultMessage: PropTypes.string, headerId: PropTypes.string, headerValues: PropTypes.object, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { - marginBottom: 30 + marginBottom: 30, }, header: { marginHorizontal: 15, marginBottom: 10, fontSize: 13, - color: changeOpacity(theme.centerChannelColor, 0.5) + color: changeOpacity(theme.centerChannelColor, 0.5), }, items: { backgroundColor: theme.centerChannelBg, borderTopWidth: 1, borderBottomWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.1), - borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1) + borderBottomColor: changeOpacity(theme.centerChannelColor, 0.1), }, footer: { marginHorizontal: 15, marginTop: 10, fontSize: 12, - color: changeOpacity(theme.centerChannelColor, 0.5) - } + color: changeOpacity(theme.centerChannelColor, 0.5), + }, }; }); diff --git a/app/screens/settings/section_item.js b/app/screens/settings/section_item.js index 629b79854..056ec71ee 100644 --- a/app/screens/settings/section_item.js +++ b/app/screens/settings/section_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Switch, TouchableOpacity, - View + View, } from 'react-native'; import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome'; @@ -17,7 +17,7 @@ const ActionTypes = { ARROW: 'arrow', DEFAULT: 'default', TOGGLE: 'toggle', - SELECT: 'select' + SELECT: 'select', }; function sectionItem(props) { @@ -28,7 +28,7 @@ function sectionItem(props) { label, theme, selected, - description + description, } = props; const style = getStyleSheet(theme); @@ -99,12 +99,12 @@ sectionItem.propTypes = { label: PropTypes.node.isRequired, selected: PropTypes.bool, theme: PropTypes.object.isRequired, - description: PropTypes.node + description: PropTypes.node, }; sectionItem.defaultProps = { action: () => true, - actionType: ActionTypes.DEFAULT + actionType: ActionTypes.DEFAULT, }; const getStyleSheet = makeStyleSheetFromTheme((theme) => { @@ -112,33 +112,33 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { container: { flexDirection: 'row', alignItems: 'center', - paddingHorizontal: 15 + paddingHorizontal: 15, }, singleContainer: { alignItems: 'center', flex: 1, flexDirection: 'row', - height: 45 + height: 45, }, doubleContainer: { flex: 1, flexDirection: 'column', height: 69, - justifyContent: 'center' + justifyContent: 'center', }, label: { color: theme.centerChannelColor, - fontSize: 15 + fontSize: 15, }, description: { color: changeOpacity(theme.centerChannelColor, 0.6), fontSize: 14, - marginTop: 3 + marginTop: 3, }, arrow: { color: changeOpacity(theme.centerChannelColor, 0.25), - fontSize: 24 - } + fontSize: 24, + }, }; }); diff --git a/app/screens/settings/settings_item/index.js b/app/screens/settings/settings_item/index.js index 6761d6306..87db60f37 100644 --- a/app/screens/settings/settings_item/index.js +++ b/app/screens/settings/settings_item/index.js @@ -23,12 +23,12 @@ export default class SettingsItem extends PureComponent { rightComponent: PropTypes.node, separator: PropTypes.bool, showArrow: PropTypes.bool, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static defaultProps = { isDestructor: false, - separator: true + separator: true, }; renderText = () => { @@ -37,7 +37,7 @@ export default class SettingsItem extends PureComponent { defaultMessage, i18nId, isDestructor, - theme + theme, } = this.props; const style = getStyleSheet(theme); @@ -73,7 +73,7 @@ export default class SettingsItem extends PureComponent { rightComponent, separator, showArrow, - theme + theme, } = this.props; const style = getStyleSheet(theme); diff --git a/app/screens/settings/settings_item/style.android.js b/app/screens/settings/settings_item/style.android.js index eeabfeede..ec460e870 100644 --- a/app/screens/settings/settings_item/style.android.js +++ b/app/screens/settings/settings_item/style.android.js @@ -9,29 +9,29 @@ export default makeStyleSheetFromTheme((theme) => { alignItems: 'center', backgroundColor: theme.centerChannelBg, flexDirection: 'row', - height: 68 + height: 68, }, iconContainer: { width: 42, height: 68, alignItems: 'center', justifyContent: 'center', - marginHorizontal: 15 + marginHorizontal: 15, }, icon: { color: theme.buttonBg, - fontSize: 25 + fontSize: 25, }, wrapper: { - flex: 1 + flex: 1, }, centerLabel: { textAlign: 'center', - textAlignVertical: 'center' + textAlignVertical: 'center', }, labelContainer: { flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, label: { color: theme.centerChannelColor, @@ -39,18 +39,18 @@ export default makeStyleSheetFromTheme((theme) => { fontSize: 17, textAlignVertical: 'center', includeFontPadding: false, - paddingRight: 15 + paddingRight: 15, }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), - height: 1 + height: 1, }, arrowContainer: { justifyContent: 'center', - paddingRight: 15 + paddingRight: 15, }, destructor: { - color: theme.errorTextColor - } + color: theme.errorTextColor, + }, }; }); diff --git a/app/screens/settings/settings_item/style.ios.js b/app/screens/settings/settings_item/style.ios.js index ef007a6f6..edd8bf5dc 100644 --- a/app/screens/settings/settings_item/style.ios.js +++ b/app/screens/settings/settings_item/style.ios.js @@ -9,7 +9,7 @@ export default makeStyleSheetFromTheme((theme) => { alignItems: 'center', backgroundColor: theme.centerChannelBg, flexDirection: 'row', - height: 45 + height: 45, }, iconContainer: { width: 29, @@ -18,44 +18,44 @@ export default makeStyleSheetFromTheme((theme) => { borderRadius: 7, alignItems: 'center', justifyContent: 'center', - marginHorizontal: 15 + marginHorizontal: 15, }, icon: { color: theme.buttonColor, fontSize: 18, - marginTop: 2 + marginTop: 2, }, wrapper: { - flex: 1 + flex: 1, }, centerLabel: { textAlign: 'center', - textAlignVertical: 'center' + textAlignVertical: 'center', }, labelContainer: { flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, label: { color: theme.centerChannelColor, flex: 1, fontSize: 17, - lineHeight: 43 + lineHeight: 43, }, arrowContainer: { justifyContent: 'center', - paddingRight: 15 + paddingRight: 15, }, arrow: { color: changeOpacity(theme.centerChannelColor, 0.25), - fontSize: 18 + fontSize: 18, }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), - height: 1 + height: 1, }, destructor: { - color: theme.errorTextColor - } + color: theme.errorTextColor, + }, }; }); diff --git a/app/screens/sso/index.js b/app/screens/sso/index.js index 0e562632f..05d8bebf5 100644 --- a/app/screens/sso/index.js +++ b/app/screens/sso/index.js @@ -14,7 +14,7 @@ import SSO from './sso'; function mapStateToProps(state) { return { ...state.views.selectServer, - theme: getTheme(state) + theme: getTheme(state), }; } @@ -23,8 +23,8 @@ function mapDispatchToProps(dispatch) { actions: bindActionCreators({ getSession, handleSuccessfulLogin, - setStoreFromLocalData - }, dispatch) + setStoreFromLocalData, + }, dispatch), }; } diff --git a/app/screens/sso/sso.js b/app/screens/sso/sso.js index a1b1b8dc0..2399c2915 100644 --- a/app/screens/sso/sso.js +++ b/app/screens/sso/sso.js @@ -9,7 +9,7 @@ import { Platform, Text, View, - WebView + WebView, } from 'react-native'; import CookieManager from 'react-native-cookies'; @@ -48,8 +48,8 @@ class SSO extends PureComponent { actions: PropTypes.shape({ getSession: PropTypes.func.isRequired, handleSuccessfulLogin: PropTypes.func.isRequired, - setStoreFromLocalData: PropTypes.func.isRequired - }).isRequired + setStoreFromLocalData: PropTypes.func.isRequired, + }).isRequired, }; constructor(props) { @@ -60,7 +60,7 @@ class SSO extends PureComponent { renderWebView: false, onMessage: props.ssoType === ViewTypes.GITLAB ? this.onMessage : null, jsCode: postMessageJS, - scalePagesToFit: false + scalePagesToFit: false, }; switch (props.ssoType) { @@ -90,11 +90,11 @@ class SSO extends PureComponent { date: new Date(expiresAt), message: intl.formatMessage({ id: 'mobile.session_expired', - defaultMessage: 'Session Expired: Please log in to continue receiving notifications.' + defaultMessage: 'Session Expired: Please log in to continue receiving notifications.', }), userInfo: { - localNotification: true - } + localNotification: true, + }, }); } @@ -109,8 +109,8 @@ class SSO extends PureComponent { navBarHidden: true, statusBarHidden: false, statusBarHideWithNavBar: false, - screenBackgroundColor: 'transparent' - } + screenBackgroundColor: 'transparent', + }, }); }; @@ -121,7 +121,7 @@ class SSO extends PureComponent { const { id, message, - status_code: statusCode + status_code: statusCode, } = response; if (id && message && statusCode !== 200) { this.setState({error: message}); @@ -169,7 +169,7 @@ class SSO extends PureComponent { const { getSession, handleSuccessfulLogin, - setStoreFromLocalData + setStoreFromLocalData, } = this.props.actions; Client4.setToken(token); @@ -232,15 +232,15 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { errorContainer: { alignItems: 'center', flex: 1, - marginTop: 40 + marginTop: 40, }, errorText: { color: changeOpacity(theme.centerChannelColor, 0.4), fontSize: 16, fontWeight: '400', lineHeight: 23, - paddingHorizontal: 30 - } + paddingHorizontal: 30, + }, }; }); diff --git a/app/screens/table/table.js b/app/screens/table/table.js index 6e4cc6d8a..0b1a7af66 100644 --- a/app/screens/table/table.js +++ b/app/screens/table/table.js @@ -7,7 +7,7 @@ import {ScrollView, StyleSheet} from 'react-native'; export default class Table extends React.PureComponent { static propTypes = { - renderRows: PropTypes.func.isRequired + renderRows: PropTypes.func.isRequired, }; render() { @@ -24,9 +24,9 @@ export default class Table extends React.PureComponent { const style = StyleSheet.create({ scrollContainer: { - flex: 1 + flex: 1, }, container: { - flexDirection: 'row' - } + flexDirection: 'row', + }, }); diff --git a/app/screens/table_image/index.js b/app/screens/table_image/index.js index 53359b43e..5345fb255 100644 --- a/app/screens/table_image/index.js +++ b/app/screens/table_image/index.js @@ -9,7 +9,7 @@ import TableImage from './table_image'; function mapStateToProps(state) { return { - deviceWidth: getDimensions(state).deviceWidth + deviceWidth: getDimensions(state).deviceWidth, }; } diff --git a/app/screens/table_image/table_image.js b/app/screens/table_image/table_image.js index 575502a25..03a0a3856 100644 --- a/app/screens/table_image/table_image.js +++ b/app/screens/table_image/table_image.js @@ -8,13 +8,13 @@ import { Image, ScrollView, StyleSheet, - View + View, } from 'react-native'; export default class TableImage extends React.PureComponent { static propTypes = { deviceWidth: PropTypes.number.isRequired, - imageSource: PropTypes.string.isRequired + imageSource: PropTypes.string.isRequired, }; constructor(props) { @@ -22,7 +22,7 @@ export default class TableImage extends React.PureComponent { this.state = { width: -1, - height: -1 + height: -1, }; } @@ -34,7 +34,7 @@ export default class TableImage extends React.PureComponent { if (this.props.imageSource !== nextProps.imageSource) { this.setState({ width: -1, - height: -1 + height: -1, }); this.getImageSize(nextProps.imageSource); @@ -45,7 +45,7 @@ export default class TableImage extends React.PureComponent { Image.getSize(imageSource, (width, height) => { this.setState({ width, - height + height, }); }); } @@ -85,18 +85,18 @@ export default class TableImage extends React.PureComponent { const style = StyleSheet.create({ scrollContainer: { - flex: 1 + flex: 1, }, container: { flex: 1, - flexDirection: 'column' + flexDirection: 'column', }, image: { - resizeMode: 'contain' + resizeMode: 'contain', }, loadingContainer: { alignItems: 'center', flex: 1, - justifyContent: 'center' - } + justifyContent: 'center', + }, }); diff --git a/app/screens/thread/index.js b/app/screens/thread/index.js index 6fa23b2dc..00dd162d8 100644 --- a/app/screens/thread/index.js +++ b/app/screens/thread/index.js @@ -26,7 +26,7 @@ function makeMapStateToProps() { myMember: getMyCurrentChannelMembership(state), rootId: ownProps.rootId, postIds: getPostIdsForThread(state, ownProps.rootId), - theme: getTheme(state) + theme: getTheme(state), }; }; } @@ -34,8 +34,8 @@ function makeMapStateToProps() { function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - selectPost - }, dispatch) + selectPost, + }, dispatch), }; } diff --git a/app/screens/thread/thread.js b/app/screens/thread/thread.js index be6b8a009..d37b089d0 100644 --- a/app/screens/thread/thread.js +++ b/app/screens/thread/thread.js @@ -18,7 +18,7 @@ import {makeStyleSheetFromTheme, setNavigatorStyles} from 'app/utils/theme'; class Thread extends PureComponent { static propTypes = { actions: PropTypes.shape({ - selectPost: PropTypes.func.isRequired + selectPost: PropTypes.func.isRequired, }).isRequired, channelId: PropTypes.string.isRequired, channelType: PropTypes.string.isRequired, @@ -28,7 +28,7 @@ class Thread extends PureComponent { myMember: PropTypes.object.isRequired, rootId: PropTypes.string.isRequired, theme: PropTypes.object.isRequired, - postIds: PropTypes.array.isRequired + postIds: PropTypes.array.isRequired, }; state = {}; @@ -44,7 +44,7 @@ class Thread extends PureComponent { } this.props.navigator.setTitle({ - title + title, }); } @@ -72,11 +72,11 @@ class Thread extends PureComponent { if (Platform.OS === 'ios') { navigator.pop({ - animated: true + animated: true, }); } else { navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); } }; @@ -88,7 +88,7 @@ class Thread extends PureComponent { navigator, postIds, rootId, - theme + theme, } = this.props; const style = getStyle(theme); @@ -125,8 +125,8 @@ const getStyle = makeStyleSheetFromTheme((theme) => { return { container: { flex: 1, - backgroundColor: theme.centerChannelBg - } + backgroundColor: theme.centerChannelBg, + }, }; }); diff --git a/app/screens/user_profile/index.js b/app/screens/user_profile/index.js index 8a4f7a264..c6009d6dd 100644 --- a/app/screens/user_profile/index.js +++ b/app/screens/user_profile/index.js @@ -26,7 +26,7 @@ function mapStateToProps(state, ownProps) { currentUserId: getCurrentUserId(state), user: state.entities.users.profiles[ownProps.userId], teammateNameDisplay: getTeammateNameDisplaySetting(state), - theme: getTheme(state) + theme: getTheme(state), }; } @@ -34,8 +34,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ makeDirectChannel, - setChannelDisplayName - }, dispatch) + setChannelDisplayName, + }, dispatch), }; } diff --git a/app/screens/user_profile/user_profile.js b/app/screens/user_profile/user_profile.js index e5877d6d1..10dc20271 100644 --- a/app/screens/user_profile/user_profile.js +++ b/app/screens/user_profile/user_profile.js @@ -8,7 +8,7 @@ import { ScrollView, Text, View, - Linking + Linking, } from 'react-native'; import {injectIntl, intlShape} from 'react-intl'; @@ -27,7 +27,7 @@ class UserProfile extends PureComponent { static propTypes = { actions: PropTypes.shape({ makeDirectChannel: PropTypes.func.isRequired, - setChannelDisplayName: PropTypes.func.isRequired + setChannelDisplayName: PropTypes.func.isRequired, }).isRequired, config: PropTypes.object.isRequired, currentChannel: PropTypes.object.isRequired, @@ -37,7 +37,7 @@ class UserProfile extends PureComponent { navigator: PropTypes.object, teammateNameDisplay: PropTypes.string, theme: PropTypes.object.isRequired, - user: PropTypes.object.isRequired + user: PropTypes.object.isRequired, }; componentWillReceiveProps(nextProps) { @@ -50,12 +50,12 @@ class UserProfile extends PureComponent { const {navigator} = this.props; navigator.popToRoot({ - animated: true + animated: true, }); if (Platform.OS === 'android') { navigator.dismissModal({ - animationType: 'slide-down' + animationType: 'slide-down', }); } }; @@ -112,10 +112,10 @@ class UserProfile extends PureComponent { result.error, { id: 'mobile.open_dm.error', - defaultMessage: "We couldn't open a direct message with {displayName}. Please check your connection and try again." + defaultMessage: "We couldn't open a direct message with {displayName}. Please check your connection and try again.", }, { - displayName: userDisplayName + displayName: userDisplayName, } ); } else { @@ -213,43 +213,43 @@ class UserProfile extends PureComponent { const createStyleSheet = makeStyleSheetFromTheme((theme) => { return { container: { - flex: 1 + flex: 1, }, content: { marginBottom: 25, - marginHorizontal: 15 + marginHorizontal: 15, }, displayName: { marginTop: 15, color: theme.centerChannelColor, fontSize: 17, - fontWeight: '600' + fontWeight: '600', }, header: { fontSize: 13, fontWeight: '600', color: changeOpacity(theme.centerChannelColor, 0.5), marginTop: 25, - marginBottom: 10 + marginBottom: 10, }, scrollView: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, text: { fontSize: 15, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, top: { padding: 25, alignItems: 'center', - justifyContent: 'center' + justifyContent: 'center', }, username: { marginTop: 15, color: theme.centerChannelColor, - fontSize: 15 - } + fontSize: 15, + }, }; }); diff --git a/app/screens/user_profile/user_profile_row.js b/app/screens/user_profile/user_profile_row.js index 784dd9437..9e6be0734 100644 --- a/app/screens/user_profile/user_profile_row.js +++ b/app/screens/user_profile/user_profile_row.js @@ -7,7 +7,7 @@ import { Switch, Text, TouchableHighlight, - View + View, } from 'react-native'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -24,31 +24,31 @@ const createStyleSheet = makeStyleSheetFromTheme((theme) => { borderTopWidth: 1, borderBottomWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.3), - borderBottomColor: changeOpacity(theme.centerChannelColor, 0.3) + borderBottomColor: changeOpacity(theme.centerChannelColor, 0.3), }, detail: { marginHorizontal: 15, color: 'rgba(0, 0, 0, 0.5)', - fontSize: 15 + fontSize: 15, }, label: { flex: 1, marginLeft: 15, fontSize: 15, paddingVertical: 15, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, leftIcon: { width: 17, - color: theme.centerChannelColor + color: theme.centerChannelColor, }, rightIcon: { color: theme.centerChannelColor, - opacity: 0.7 + opacity: 0.7, }, wrapper: { - backgroundColor: '#ddd' - } + backgroundColor: '#ddd', + }, }; }); @@ -113,7 +113,7 @@ userProfileRow.propTypes = { detail: PropTypes.oneOfType([ PropTypes.string, PropTypes.number, - PropTypes.bool + PropTypes.bool, ]), icon: PropTypes.string.isRequired, iconType: PropTypes.oneOf(['fontawesome', 'foundation', 'ion', 'material']), @@ -122,14 +122,14 @@ userProfileRow.propTypes = { textId: PropTypes.string.isRequired, togglable: PropTypes.bool, textColor: PropTypes.string, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; userProfileRow.defaultProps = { iconColor: 'rgba(0, 0, 0, 0.7)', iconSize: 15, textColor: '#000', - togglable: false + togglable: false, }; export default userProfileRow; diff --git a/app/selectors/autocomplete.js b/app/selectors/autocomplete.js index fc78a44f0..98b3e3508 100644 --- a/app/selectors/autocomplete.js +++ b/app/selectors/autocomplete.js @@ -7,7 +7,7 @@ import {General} from 'mattermost-redux/constants'; import {getMyChannels, getOtherChannels} from 'mattermost-redux/selectors/entities/channels'; import { getCurrentUser, getCurrentUserId, getProfilesInCurrentChannel, - getProfilesNotInCurrentChannel, getProfilesInCurrentTeam + getProfilesNotInCurrentChannel, getProfilesInCurrentTeam, } from 'mattermost-redux/selectors/entities/users'; import {sortChannelsByDisplayName} from 'mattermost-redux/utils/channel_utils'; import {sortByUsername} from 'mattermost-redux/utils/user_utils'; diff --git a/app/selectors/client_upgrade.js b/app/selectors/client_upgrade.js index 7fbbdd639..47e5ea054 100644 --- a/app/selectors/client_upgrade.js +++ b/app/selectors/client_upgrade.js @@ -25,7 +25,7 @@ const getClientUpgrade = createSelector( downloadLink, forceUpgrade: LocalConfig.EnableForceMobileClientUpgrade, latestVersion, - minVersion + minVersion, }; } ); diff --git a/app/selectors/views.js b/app/selectors/views.js index 98f9efe9b..779f1defe 100644 --- a/app/selectors/views.js +++ b/app/selectors/views.js @@ -7,7 +7,7 @@ import {getCurrentChannelId} from 'mattermost-redux/selectors/entities/channels' const emptyDraft = { draft: '', - files: [] + files: [], }; function getChannelDrafts(state) { diff --git a/app/store/index.js b/app/store/index.js index 8dd2c3175..ce4728b3e 100644 --- a/app/store/index.js +++ b/app/store/index.js @@ -31,16 +31,16 @@ const usersSetTransform = [ 'profilesInChannel', 'profilesNotInChannel', 'profilesInTeam', - 'profilesNotInTeam' + 'profilesNotInTeam', ]; const channelSetTransform = [ - 'channelsInTeam' + 'channelsInTeam', ]; const setTransforms = [ ...usersSetTransform, - ...channelSetTransform + ...channelSetTransform, ]; export default function configureAppStore(initialState) { @@ -67,7 +67,7 @@ export default function configureAppStore(initialState) { return { ...inboundState, - channel + channel, }; }, null, @@ -87,7 +87,7 @@ export default function configureAppStore(initialState) { return { ...inboundState, - emojis + emojis, }; }, null, @@ -140,7 +140,7 @@ export default function configureAppStore(initialState) { const persistor = persistStore(store, {storage: AsyncStorage, ...options}, () => { store.dispatch({ type: General.STORE_REHYDRATION_COMPLETE, - complete: true + complete: true, }); }); @@ -167,16 +167,16 @@ export default function configureAppStore(initialState) { store.dispatch(batchActions([ { type: General.OFFLINE_STORE_RESET, - data: initialState + data: initialState, }, { type: ViewTypes.SERVER_URL_CHANGED, - serverUrl: state.entities.general.credentials.url || state.views.selectServer.serverUrl + serverUrl: state.entities.general.credentials.url || state.views.selectServer.serverUrl, }, { type: GeneralTypes.RECEIVED_APP_DEVICE_TOKEN, - data: state.entities.general.deviceToken - } + data: state.entities.general.deviceToken, + }, ])); setTimeout(() => { @@ -190,27 +190,27 @@ export default function configureAppStore(initialState) { store.dispatch(batchActions([ { type: General.OFFLINE_STORE_RESET, - data: initialState + data: initialState, }, { type: ErrorTypes.RESTORE_ERRORS, - data: [...state.errors] + data: [...state.errors], }, { type: GeneralTypes.RECEIVED_APP_DEVICE_TOKEN, - data: state.entities.general.deviceToken + data: state.entities.general.deviceToken, }, { type: GeneralTypes.RECEIVED_APP_CREDENTIALS, data: { url: state.entities.general.credentials.url, - token: state.entities.general.credentials.token - } + token: state.entities.general.credentials.token, + }, }, { type: ViewTypes.SERVER_URL_CHANGED, - serverUrl: state.entities.general.credentials.url || state.views.selectServer.serverUrl - } + serverUrl: state.entities.general.credentials.url || state.views.selectServer.serverUrl, + }, ], 'BATCH_FOR_RESTART')); setTimeout(() => { @@ -224,7 +224,7 @@ export default function configureAppStore(initialState) { }, persistOptions: { autoRehydrate: { - log: false + log: false, }, blacklist: ['device', 'navigation', 'offline', 'requests'], debounce: 500, @@ -233,13 +233,13 @@ export default function configureAppStore(initialState) { viewsBlackListFilter, typingBlackListFilter, channelViewBlackListFilter, - emojiBlackListFilter - ] - } + emojiBlackListFilter, + ], + }, }; const additionalMiddleware = [createSentryMiddleware(), messageRetention, shareExtensionData]; return configureStore(initialState, appReducer, offlineOptions, getAppReducer, { - additionalMiddleware + additionalMiddleware, }); } diff --git a/app/store/middleware.js b/app/store/middleware.js index b10addb47..3281d8866 100644 --- a/app/store/middleware.js +++ b/app/store/middleware.js @@ -12,7 +12,7 @@ import Config from 'assets/config'; import { captureException, - LOGGER_JAVASCRIPT_WARNING + LOGGER_JAVASCRIPT_WARNING, } from 'app/utils/sentry'; export function messageRetention(store) { @@ -66,7 +66,7 @@ function resetStateForNewVersion(action) { teams = { currentTeamId: payload.entities.teams.currentTeamId, teams: payload.entities.teams.teams, - myMembers: payload.entities.teams.myMembers + myMembers: payload.entities.teams.myMembers, }; } @@ -77,8 +77,8 @@ function resetStateForNewVersion(action) { users = { currentUserId, profiles: { - [currentUserId]: payload.entities.users.profiles[currentUserId] - } + [currentUserId]: payload.entities.users.profiles[currentUserId], + }, }; } } @@ -91,7 +91,7 @@ function resetStateForNewVersion(action) { let search = initialState.entities.search; if (payload.entities.search && payload.entities.search.recent) { search = { - recent: payload.entities.search.recent + recent: payload.entities.search.recent, }; } @@ -133,37 +133,37 @@ function resetStateForNewVersion(action) { const nextState = { app: { build: DeviceInfo.getBuildNumber(), - version: DeviceInfo.getVersion() + version: DeviceInfo.getVersion(), }, entities: { general, teams, users, preferences, - search + search, }, views: { channel: { - drafts: channelDrafts + drafts: channelDrafts, }, i18n, fetchCache, team: { lastTeamId, - lastChannelForTeam + lastChannelForTeam, }, thread: { - drafts: threadDrafts + drafts: threadDrafts, }, selectServer, - recentEmojis - } + recentEmojis, + }, }; return { type: action.type, payload: nextState, - error: action.error + error: action.error, }; } @@ -193,12 +193,12 @@ function cleanupState(action, keepCurrent = false) { reactions: {}, openGraph: payload.entities.posts.openGraph, selectedPostId: payload.entities.posts.selectedPostId, - currentFocusedPostId: payload.entities.posts.currentFocusedPostId + currentFocusedPostId: payload.entities.posts.currentFocusedPostId, }, files: { files: {}, - fileIdsByPostId: {} - } + fileIdsByPostId: {}, + }, }; let retentionPeriod = 0; @@ -313,19 +313,19 @@ function cleanupState(action, keepCurrent = false) { preferences: resetPayload.entities.preferences, search: { ...resetPayload.entities.search, - results: searchResults + results: searchResults, }, teams: resetPayload.entities.teams, - users: payload.entities.users + users: payload.entities.users, }, views: { announcement: payload.views.announcement, ...resetPayload.views, channel: { ...resetPayload.views.channel, - ...payload.views.channel - } - } + ...payload.views.channel, + }, + }, }; nextState.errors = payload.errors; @@ -333,7 +333,7 @@ function cleanupState(action, keepCurrent = false) { return { type: 'persist/REHYDRATE', payload: nextState, - error: action.error + error: action.error, }; } diff --git a/app/styles/index.js b/app/styles/index.js index e391e5b99..91232081c 100644 --- a/app/styles/index.js +++ b/app/styles/index.js @@ -12,21 +12,21 @@ export const GlobalStyles = StyleSheet.create({ flexDirection: 'column', justifyContent: 'center', alignItems: 'center', - backgroundColor: 'white' + backgroundColor: 'white', }, signupContainer: { paddingRight: 15, - paddingLeft: 15 + paddingLeft: 15, }, pagePush: { - height: 50 + height: 50, }, header: { textAlign: 'center', marginTop: 15, marginBottom: 15, fontSize: 32, - fontWeight: '600' + fontWeight: '600', }, subheader: { textAlign: 'center', @@ -34,7 +34,7 @@ export const GlobalStyles = StyleSheet.create({ fontWeight: '300', color: '#777', marginBottom: 15, - lineHeight: 22 + lineHeight: 22, }, signupButton: { borderRadius: 3, @@ -43,18 +43,18 @@ export const GlobalStyles = StyleSheet.create({ alignItems: 'center', alignSelf: 'stretch', marginTop: 10, - padding: 15 + padding: 15, }, signupButtonText: { textAlign: 'center', color: '#2389D7', - fontSize: 17 + fontSize: 17, }, buttonListItemText: { textAlign: 'left', fontSize: 18, fontWeight: '400', - color: '#777' + color: '#777', }, buttonListItem: { alignSelf: 'stretch', @@ -65,24 +65,24 @@ export const GlobalStyles = StyleSheet.create({ backgroundColor: '#fafafa', borderWidth: 1, borderRadius: 3, - borderColor: '#d5d5d5' + borderColor: '#d5d5d5', }, button: { margin: 3, paddingTop: 10, paddingBottom: 10, paddingLeft: 15, - paddingRight: 15 + paddingRight: 15, }, buttonText: { color: '#5890FF', - fontSize: 18 + fontSize: 18, }, label: { fontSize: 20, - fontWeight: '400' + fontWeight: '400', }, errorLabel: { @@ -90,14 +90,14 @@ export const GlobalStyles = StyleSheet.create({ marginTop: 15, marginBottom: 15, fontSize: 12, - textAlign: 'left' + textAlign: 'left', }, switchUp: { padding: 0, backgroundColor: 'green', paddingBottom: 50, - alignItems: 'center' + alignItems: 'center', }, inputBox: { @@ -109,6 +109,6 @@ export const GlobalStyles = StyleSheet.create({ marginBottom: 5, paddingLeft: 10, alignSelf: 'stretch', - borderRadius: 3 - } + borderRadius: 3, + }, }); diff --git a/app/utils/file.js b/app/utils/file.js index 074e16912..9f997abf3 100644 --- a/app/utils/file.js +++ b/app/utils/file.js @@ -73,7 +73,7 @@ export function buildFileUploadData(file) { uri, name, type: mimeType, - extension + extension, }; } diff --git a/app/utils/latinise.js b/app/utils/latinise.js index 5c0059ff1..9e1c7b036 100644 --- a/app/utils/latinise.js +++ b/app/utils/latinise.js @@ -991,7 +991,7 @@ var latinMap = { // CANNOT FIND APPROXIMATION FOR 'LATIN SUBSCRIPT SMALL LETTER SCHWA' (ₔ) ᵤ: 'u', // LATIN SUBSCRIPT SMALL LETTER U ᵥ: 'v', // LATIN SUBSCRIPT SMALL LETTER V - ₓ: 'x' // LATIN SUBSCRIPT SMALL LETTER X + ₓ: 'x', // LATIN SUBSCRIPT SMALL LETTER X }; export function map(x) { diff --git a/app/utils/markdown.js b/app/utils/markdown.js index 7940fd8c7..5425e18c7 100644 --- a/app/utils/markdown.js +++ b/app/utils/markdown.js @@ -20,100 +20,100 @@ export const getMarkdownTextStyles = makeStyleSheetFromTheme((theme) => { return { emph: { - fontStyle: 'italic' + fontStyle: 'italic', }, strong: { - fontWeight: 'bold' + fontWeight: 'bold', }, del: { - textDecorationLine: 'line-through' + textDecorationLine: 'line-through', }, link: { - color: theme.linkColor + color: theme.linkColor, }, heading1: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', - lineHeight: normalizeFontSizeByDevice(22) + lineHeight: normalizeFontSizeByDevice(22), }, heading1Text: { - paddingBottom: normalizeFontSizeByDevice(6) + paddingBottom: normalizeFontSizeByDevice(6), }, heading2: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', - lineHeight: normalizeFontSizeByDevice(22) + lineHeight: normalizeFontSizeByDevice(22), }, heading2Text: { - paddingBottom: normalizeFontSizeByDevice(6) + paddingBottom: normalizeFontSizeByDevice(6), }, heading3: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', - lineHeight: normalizeFontSizeByDevice(22) + lineHeight: normalizeFontSizeByDevice(22), }, heading3Text: { - paddingBottom: normalizeFontSizeByDevice(6) + paddingBottom: normalizeFontSizeByDevice(6), }, heading4: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', - lineHeight: normalizeFontSizeByDevice(22) + lineHeight: normalizeFontSizeByDevice(22), }, heading4Text: { - paddingBottom: normalizeFontSizeByDevice(6) + paddingBottom: normalizeFontSizeByDevice(6), }, heading5: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', - lineHeight: normalizeFontSizeByDevice(22) + lineHeight: normalizeFontSizeByDevice(22), }, heading5Text: { - paddingBottom: normalizeFontSizeByDevice(6) + paddingBottom: normalizeFontSizeByDevice(6), }, heading6: { fontSize: normalizeFontSizeByDevice(16), fontWeight: '700', - lineHeight: normalizeFontSizeByDevice(22) + lineHeight: normalizeFontSizeByDevice(22), }, heading6Text: { - paddingBottom: normalizeFontSizeByDevice(6) + paddingBottom: normalizeFontSizeByDevice(6), }, code: { alignSelf: 'center', backgroundColor: changeOpacity(theme.centerChannelColor, 0.07), - fontFamily: codeFont + fontFamily: codeFont, }, codeBlock: { - fontFamily: codeFont + fontFamily: codeFont, }, mention: { - color: theme.linkColor + color: theme.linkColor, }, error: { - color: theme.errorTextColor + color: theme.errorTextColor, }, table_header_row: { - fontWeight: '700' - } + fontWeight: '700', + }, }; }); export const getMarkdownBlockStyles = makeStyleSheetFromTheme((theme) => { return { adjacentParagraph: { - marginTop: 6 + marginTop: 6, }, horizontalRule: { backgroundColor: theme.centerChannelColor, height: StyleSheet.hairlineWidth, flex: 1, - marginVertical: 10 + marginVertical: 10, }, quoteBlockIcon: { color: changeOpacity(theme.centerChannelColor, 0.5), - padding: 5 - } + padding: 5, + }, }; }); @@ -175,7 +175,7 @@ const languages = { vbscript: 'VBScript', verilog: 'Verilog', xml: 'XML', - yaml: 'YAML' + yaml: 'YAML', }; export function getDisplayNameForLanguage(language) { diff --git a/app/utils/member_list.js b/app/utils/member_list.js index 1b85d19ce..ddfbb0c80 100644 --- a/app/utils/member_list.js +++ b/app/utils/member_list.js @@ -3,7 +3,7 @@ export const loadingText = { id: 'mobile.loading_members', - defaultMessage: 'Loading Members...' + defaultMessage: 'Loading Members...', }; export function createMembersSections(data) { diff --git a/app/utils/network.js b/app/utils/network.js index a84316450..cd8253911 100644 --- a/app/utils/network.js +++ b/app/utils/network.js @@ -35,6 +35,6 @@ export default function networkConnectionListener(onChange) { const removeEventListener = () => NetInfo.isConnected.removeEventListener('connectionChange', connectionChanged); // eslint-disable-line return { - removeEventListener + removeEventListener, }; } diff --git a/app/utils/notify_props.js b/app/utils/notify_props.js index 611c4cc5e..c67d9b507 100644 --- a/app/utils/notify_props.js +++ b/app/utils/notify_props.js @@ -14,7 +14,7 @@ export function getNotificationProps(user) { email: 'true', mention_keys: user ? `${user.username},@${user.username}` : '', push: 'mention', - push_status: 'online' + push_status: 'online', }; if (!user || !user.first_name) { diff --git a/app/utils/segment.js b/app/utils/segment.js index 28df446b3..5d9899719 100644 --- a/app/utils/segment.js +++ b/app/utils/segment.js @@ -17,23 +17,23 @@ export function init(config) { const {height, width} = Dimensions.get('window'); global.analytics = new Analytics(Config.SegmentApiKey, { flushAt: 20, - flushInterval: 10000 + flushInterval: 10000, }); global.analytics_context = { app: { version: DeviceInfo.getVersion(), - build: DeviceInfo.getBuildNumber() + build: DeviceInfo.getBuildNumber(), }, device: { dimensions: { height, - width + width, }, isTablet: DeviceInfo.isTablet(), - os: DeviceInfo.getSystemVersion() + os: DeviceInfo.getSystemVersion(), }, ip: '0.0.0.0', - server: config.Version + server: config.Version, }; global.analytics.identify({ @@ -44,9 +44,9 @@ export function init(config) { referrer: '', search: '', title: '', - url: '' + url: '', }, - anonymousId: '00000000000000000000000000' + anonymousId: '00000000000000000000000000', }); } } @@ -61,8 +61,8 @@ export function recordTime(screenName, category, userId) { context: global.analytics_context, properties: { actual_user_id: userId, - time: Date.now() - startTime - } + time: Date.now() - startTime, + }, }); } } diff --git a/app/utils/sentry/index.js b/app/utils/sentry/index.js index 3074ad9dd..223938812 100644 --- a/app/utils/sentry/index.js +++ b/app/utils/sentry/index.js @@ -99,8 +99,8 @@ function getUserContext(state) { username: '', extra: { locale: currentUser.locale, - roles: currentUser.roles - } + roles: currentUser.roles, + }, }; } @@ -110,14 +110,14 @@ function getExtraContext(state) { const currentTeam = getCurrentTeam(state); if (currentTeam) { context.currentTeam = { - id: currentTeam.id + id: currentTeam.id, }; } const currentTeamMember = getCurrentTeamMembership(state); if (currentTeamMember) { context.currentTeamMember = { - roles: currentTeamMember.roles + roles: currentTeamMember.roles, }; } @@ -125,14 +125,14 @@ function getExtraContext(state) { if (currentChannel) { context.currentChannel = { id: currentChannel.id, - type: currentChannel.type + type: currentChannel.type, }; } const currentChannelMember = getMyCurrentChannelMembership(state); if (currentChannelMember) { context.currentChannelMember = { - roles: currentChannelMember.roles + roles: currentChannelMember.roles, }; } @@ -143,7 +143,7 @@ function getExtraContext(state) { BuildEnterpriseReady: config.BuildEnterpriseReady, BuildHash: config.BuildHash, BuildHashEnterprise: config.BuildHashEnterprise, - BuildNumber: config.BuildNumber + BuildNumber: config.BuildNumber, }; } diff --git a/app/utils/sentry/middleware.js b/app/utils/sentry/middleware.js index a47f0beae..8822dfb81 100644 --- a/app/utils/sentry/middleware.js +++ b/app/utils/sentry/middleware.js @@ -21,7 +21,7 @@ export function createSentryMiddleware() { function makeBreadcrumbFromAction(action) { const breadcrumb = { category: BREADCRUMB_REDUX_ACTION, - message: action.type + message: action.type, }; if (action.type === BATCH) { diff --git a/app/utils/theme.js b/app/utils/theme.js index 3f42ff966..81809f67f 100644 --- a/app/utils/theme.js +++ b/app/utils/theme.js @@ -81,6 +81,6 @@ export function setNavigatorStyles(navigator, theme) { navBarTextColor: theme.sidebarHeaderTextColor, navBarBackgroundColor: theme.sidebarHeaderBg, navBarButtonColor: theme.sidebarHeaderTextColor, - screenBackgroundColor: theme.centerChannelBg + screenBackgroundColor: theme.centerChannelBg, }); } diff --git a/app/utils/time_tracker.js b/app/utils/time_tracker.js index 389a8b060..ca281ba16 100644 --- a/app/utils/time_tracker.js +++ b/app/utils/time_tracker.js @@ -4,5 +4,5 @@ export default { initialLoad: 0, channelSwitch: 0, - teamSwitch: 0 + teamSwitch: 0, }; diff --git a/package.json b/package.json index 994c7a6d9..fe5386fbc 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,8 @@ }, "scripts": { "test": "NODE_ENV=test nyc --reporter=text mocha --exit --opts test/mocha.opts", + "check": "eslint --ignore-path .gitignore --ignore-pattern node_modules --quiet .", + "fix": "eslint --ignore-path .gitignore --ignore-pattern node_modules --quiet . --fix", "postinstall": "make post-install" }, "rnpm": { diff --git a/rn-cli.config.js b/rn-cli.config.js index 546f1dc6f..2cde2ee6a 100644 --- a/rn-cli.config.js +++ b/rn-cli.config.js @@ -10,9 +10,9 @@ const config = { }, getProjectRoots() { return [ - path.resolve(__dirname, '.') + path.resolve(__dirname, '.'), ]; - } + }, }; module.exports = config; diff --git a/share_extension/android/actions/index.js b/share_extension/android/actions/index.js index 665a9fdcb..7b9d62ca7 100644 --- a/share_extension/android/actions/index.js +++ b/share_extension/android/actions/index.js @@ -23,7 +23,7 @@ export function extensionSelectTeamId(teamId) { return async (dispatch, getState) => { dispatch({ type: ViewTypes.EXTENSION_SELECTED_TEAM_ID, - data: teamId + data: teamId, }, getState); }; } diff --git a/share_extension/android/extension_channels/extension_channel_item.js b/share_extension/android/extension_channels/extension_channel_item.js index 2f628de46..ce3f04a1c 100644 --- a/share_extension/android/extension_channels/extension_channel_item.js +++ b/share_extension/android/extension_channels/extension_channel_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { TouchableHighlight, Text, - View + View, } from 'react-native'; import IonIcon from 'react-native-vector-icons/Ionicons'; @@ -19,7 +19,7 @@ const channelTypes = { D: DirectChannel, G: GroupChannel, O: PublicChannel, - P: PrivateChannel + P: PrivateChannel, }; export default class ExtensionChannelItem extends PureComponent { @@ -27,7 +27,7 @@ export default class ExtensionChannelItem extends PureComponent { channel: PropTypes.object.isRequired, currentChannelId: PropTypes.string.isRequired, onSelectChannel: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; onPress = wrapWithPreventDoubleTap(() => { @@ -41,7 +41,7 @@ export default class ExtensionChannelItem extends PureComponent { const { channel, currentChannelId, - theme + theme, } = this.props; const style = getStyleSheet(theme); @@ -91,29 +91,29 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flex: 1, flexDirection: 'row', height: 45, - paddingHorizontal: 15 + paddingHorizontal: 15, }, item: { alignItems: 'center', height: 45, flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, text: { color: theme.centerChannelColor, flex: 1, fontSize: 16, - paddingRight: 5 + paddingRight: 5, }, iconContainer: { - marginRight: 5 + marginRight: 5, }, checkmarkContainer: { - alignItems: 'flex-end' + alignItems: 'flex-end', }, checkmark: { color: theme.linkColor, - fontSize: 16 - } + fontSize: 16, + }, }; }); diff --git a/share_extension/android/extension_channels/extension_channels.js b/share_extension/android/extension_channels/extension_channels.js index 044f28d98..36c974af4 100644 --- a/share_extension/android/extension_channels/extension_channels.js +++ b/share_extension/android/extension_channels/extension_channels.js @@ -9,7 +9,7 @@ import { ActivityIndicator, SectionList, Text, - View + View, } from 'react-native'; import {Preferences} from 'mattermost-redux/constants'; @@ -26,25 +26,25 @@ export default class ExtensionTeam extends PureComponent { directChannels: PropTypes.array, navigation: PropTypes.object.isRequired, privateChannels: PropTypes.array, - publicChannels: PropTypes.array + publicChannels: PropTypes.array, }; static defaultProps = { directChannels: [], privateChannels: [], - publicChannels: [] + publicChannels: [], }; static contextTypes = { - intl: intlShape + intl: intlShape, }; static navigationOptions = ({navigation}) => ({ - title: navigation.state.params.title + title: navigation.state.params.title, }); state = { - sections: null + sections: null, }; componentWillMount() { @@ -56,7 +56,7 @@ export default class ExtensionTeam extends PureComponent { let { directChannels: directFiltered, privateChannels: privateFiletered, - publicChannels: publicFiltered + publicChannels: publicFiltered, } = this.props; if (term) { @@ -69,7 +69,7 @@ export default class ExtensionTeam extends PureComponent { sections.push({ id: 'sidebar.channels', defaultMessage: 'PUBLIC CHANNELS', - data: publicFiltered + data: publicFiltered, }); } @@ -77,7 +77,7 @@ export default class ExtensionTeam extends PureComponent { sections.push({ id: 'sidebar.pg', defaultMessage: 'PRIVATE CHANNELS', - data: privateFiletered + data: privateFiletered, }); } @@ -85,7 +85,7 @@ export default class ExtensionTeam extends PureComponent { sections.push({ id: 'sidebar.direct', defaultMessage: 'DIRECT MESSAGES', - data: directFiltered + data: directFiltered, }); } @@ -198,7 +198,7 @@ export default class ExtensionTeam extends PureComponent { const styles = getStyleSheet(defaultTheme); const { defaultMessage, - id + id, } = section; return ( @@ -226,44 +226,44 @@ export default class ExtensionTeam extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { flex: { - flex: 1 + flex: 1, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), - height: 1 + height: 1, }, loadingContainer: { alignItems: 'center', flex: 1, - justifyContent: 'center' + justifyContent: 'center', }, searchContainer: { - paddingBottom: 2 + paddingBottom: 2, }, searchBarInput: { backgroundColor: '#fff', color: theme.centerChannelColor, - fontSize: 15 + fontSize: 15, }, titleContainer: { - height: 30 + height: 30, }, title: { color: theme.centerChannelColor, fontSize: 15, height: 30, textAlignVertical: 'center', - paddingHorizontal: 15 + paddingHorizontal: 15, }, errorContainer: { alignItems: 'center', flex: 1, justifyContent: 'center', - paddingHorizontal: 15 + paddingHorizontal: 15, }, error: { color: theme.errorTextColor, - fontSize: 14 - } + fontSize: 14, + }, }; }); diff --git a/share_extension/android/extension_channels/index.js b/share_extension/android/extension_channels/index.js index 461fd00b0..8749f37af 100644 --- a/share_extension/android/extension_channels/index.js +++ b/share_extension/android/extension_channels/index.js @@ -6,7 +6,7 @@ import {connect} from 'react-redux'; import { getExtensionSortedDirectChannels, getExtensionSortedPrivateChannels, - getExtensionSortedPublicChannels + getExtensionSortedPublicChannels, } from 'share_extension/android/selectors'; import ExtensionChannels from './extension_channels'; @@ -15,7 +15,7 @@ function mapStateToProps(state) { return { publicChannels: getExtensionSortedPublicChannels(state), privateChannels: getExtensionSortedPrivateChannels(state), - directChannels: getExtensionSortedDirectChannels(state) + directChannels: getExtensionSortedDirectChannels(state), }; } diff --git a/share_extension/android/extension_post/channel_button/channel_button.js b/share_extension/android/extension_post/channel_button/channel_button.js index 9203d271a..22e684be8 100644 --- a/share_extension/android/extension_post/channel_button/channel_button.js +++ b/share_extension/android/extension_post/channel_button/channel_button.js @@ -7,7 +7,7 @@ import {intlShape} from 'react-intl'; import { Text, TouchableHighlight, - View + View, } from 'react-native'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -16,11 +16,11 @@ export default class ChannelButton extends PureComponent { static propTypes = { channel: PropTypes.object.isRequired, theme: PropTypes.object.isRequired, - onPress: PropTypes.func.isRequired + onPress: PropTypes.func.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; render() { @@ -55,7 +55,7 @@ export default class ChannelButton extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { flex: { - flex: 1 + flex: 1, }, buttonContainer: { borderBottomColor: changeOpacity(theme.centerChannelColor, 0.2), @@ -63,20 +63,20 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderTopColor: changeOpacity(theme.centerChannelColor, 0.2), borderTopWidth: 1, height: 70, - paddingHorizontal: 15 + paddingHorizontal: 15, }, buttonWrapper: { alignItems: 'flex-start', - flex: 1 + flex: 1, }, buttonLabel: { fontSize: 16, marginTop: 16, - marginBottom: 3 + marginBottom: 3, }, buttonValue: { color: changeOpacity(theme.centerChannelColor, 0.6), - fontSize: 14 - } + fontSize: 14, + }, }; }); diff --git a/share_extension/android/extension_post/channel_button/index.js b/share_extension/android/extension_post/channel_button/index.js index ddb2c980c..4e68e60de 100644 --- a/share_extension/android/extension_post/channel_button/index.js +++ b/share_extension/android/extension_post/channel_button/index.js @@ -9,7 +9,7 @@ import ChannelButton from './channel_button'; function mapStateToProps(state, ownProps) { return { - channel: getChannel(state, ownProps.channelId) + channel: getChannel(state, ownProps.channelId), }; } diff --git a/share_extension/android/extension_post/extension_post.js b/share_extension/android/extension_post/extension_post.js index 749e950a8..e52011e43 100644 --- a/share_extension/android/extension_post/extension_post.js +++ b/share_extension/android/extension_post/extension_post.js @@ -13,7 +13,7 @@ import { ScrollView, Text, TextInput, - View + View, } from 'react-native'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; import Video from 'react-native-video'; @@ -34,7 +34,7 @@ import { GenericSvg, PdfSvg, PptSvg, - ZipSvg + ZipSvg, } from 'share_extension/common/icons'; import ChannelButton from './channel_button'; @@ -48,7 +48,7 @@ const extensionSvg = { pptx: PptSvg, xls: ExcelSvg, xlsx: ExcelSvg, - zip: ZipSvg + zip: ZipSvg, }; const ShareExtension = NativeModules.MattermostShare; const INPUT_HEIGHT = 150; @@ -62,11 +62,11 @@ export default class ExtensionPost extends PureComponent { navigation: PropTypes.object.isRequired, teamId: PropTypes.string.isRequired, token: PropTypes.string, - url: PropTypes.string + url: PropTypes.string, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; static navigationOptions = ({navigation}) => { @@ -122,8 +122,8 @@ export default class ExtensionPost extends PureComponent { props.navigation.setParams({ title: context.intl.formatMessage({ id: 'mobile.extension.title', - defaultMessage: 'Share in Mattermost' - }) + defaultMessage: 'Share in Mattermost', + }), }); this.state = { @@ -132,13 +132,13 @@ export default class ExtensionPost extends PureComponent { hasPermission: null, teamId: props.teamId, totalSize: 0, - value: '' + value: '', }; } componentDidMount() { this.props.navigation.setParams({ - close: this.onClose + close: this.onClose, }); this.auth(); } @@ -158,10 +158,10 @@ export default class ExtensionPost extends PureComponent { await LocalAuth.auth({ reason: formatMessage({ id: 'mobile.managed.secured_by', - defaultMessage: 'Secured by {vendor}' + defaultMessage: 'Secured by {vendor}', }, {vendor}), fallbackToPasscode: true, - suppressEnterPassword: false + suppressEnterPassword: false, }); } catch (err) { return this.onClose(); @@ -188,11 +188,11 @@ export default class ExtensionPost extends PureComponent { params: { title: formatMessage({ id: 'mobile.routes.selectChannel', - defaultMessage: 'Select Channel' + defaultMessage: 'Select Channel', }), currentChannelId: this.state.channelId, - onSelectChannel: this.handleSelectChannel - } + onSelectChannel: this.handleSelectChannel, + }, }); navigation.dispatch(navigateAction); }); @@ -205,11 +205,11 @@ export default class ExtensionPost extends PureComponent { params: { title: formatMessage({ id: 'mobile.routes.selectTeam', - defaultMessage: 'Select Team' + defaultMessage: 'Select Team', }), currentTeamId: this.state.teamId, - onSelectTeam: this.handleSelectTeam - } + onSelectTeam: this.handleSelectTeam, + }, }); navigation.dispatch(navigateAction); }); @@ -217,7 +217,7 @@ export default class ExtensionPost extends PureComponent { handleBlur = () => { if (this.input) { this.input.setNativeProps({ - autoScroll: false + autoScroll: false, }); } }; @@ -225,7 +225,7 @@ export default class ExtensionPost extends PureComponent { handleFocus = () => { if (this.input) { this.input.setNativeProps({ - autoScroll: true + autoScroll: true, }); } }; @@ -267,7 +267,7 @@ export default class ExtensionPost extends PureComponent { let totalSize = 0; this.props.navigation.setParams({ - post: this.onPost + post: this.onPost, }); for (let i = 0; i < items.length; i++) { @@ -288,7 +288,7 @@ export default class ExtensionPost extends PureComponent { fullPath, mimeType: lookupMimeType(filename.toLowerCase()), size: getFormattedFileSize(fileSize), - type: item.type + type: item.type, }); break; } @@ -315,7 +315,7 @@ export default class ExtensionPost extends PureComponent { files, token, url, - value + value, }; this.onClose(data); @@ -474,21 +474,21 @@ export default class ExtensionPost extends PureComponent { if (hasPermission === false) { const storage = formatMessage({ id: 'mobile.extension.permission', - defaultMessage: 'Mattermost needs access to the device storage to share files.' + defaultMessage: 'Mattermost needs access to the device storage to share files.', }); return this.renderErrorMessage(storage); } else if (files.length > 5) { const fileCount = formatMessage({ id: 'mobile.extension.file_limit', - defaultMessage: 'Sharing is limited to a maximum of 5 files.' + defaultMessage: 'Sharing is limited to a maximum of 5 files.', }); return this.renderErrorMessage(fileCount); } else if (totalSize > maxFileSize) { const maxSize = formatMessage({ id: 'mobile.extension.max_file_size', - defaultMessage: 'File attachments shared in Mattermost must be less than {size}.' + defaultMessage: 'File attachments shared in Mattermost must be less than {size}.', }, {size: getFormattedFileSize({size: maxFileSize})}); return this.renderErrorMessage(maxSize); @@ -509,7 +509,7 @@ export default class ExtensionPost extends PureComponent { const loginNeeded = formatMessage({ id: 'mobile.extension.authentication_required', - defaultMessage: 'Authentication required: Please first login using the app.' + defaultMessage: 'Authentication required: Please first login using the app.', }); return this.renderErrorMessage(loginNeeded); @@ -522,25 +522,25 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { alignItems: 'center', height: 50, justifyContent: 'center', - width: 50 + width: 50, }, closeButton: { color: theme.sidebarHeaderTextColor, - fontSize: 20 + fontSize: 20, }, flex: { - flex: 1 + flex: 1, }, container: { flex: 1, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, wrapper: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.05), - flex: 1 + flex: 1, }, scrollView: { - padding: 15 + padding: 15, }, input: { color: theme.centerChannelColor, @@ -548,17 +548,17 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: INPUT_HEIGHT, marginBottom: 5, textAlignVertical: 'top', - width: '100%' + width: '100%', }, unauthenticatedContainer: { alignItems: 'center', flex: 1, paddingHorizontal: 20, - paddingTop: 35 + paddingTop: 35, }, unauthenticated: { color: theme.errorTextColor, - fontSize: 14 + fontSize: 14, }, fileContainer: { alignItems: 'center', @@ -569,12 +569,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flexDirection: 'row', height: 48, marginBottom: 10, - width: '100%' + width: '100%', }, filename: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 13, - flex: 1 + flex: 1, }, otherContainer: { borderBottomLeftRadius: 4, @@ -582,17 +582,17 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 48, marginRight: 10, paddingVertical: 10, - width: 38 + width: 38, }, otherWrapper: { borderRightWidth: 1, borderRightColor: changeOpacity(theme.centerChannelColor, 0.2), - flex: 1 + flex: 1, }, fileIcon: { alignItems: 'center', justifyContent: 'center', - flex: 1 + flex: 1, }, imageContainer: { justifyContent: 'center', @@ -601,7 +601,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 48, marginRight: 10, width: 38, - overflow: 'hidden' + overflow: 'hidden', }, image: { alignItems: 'center', @@ -610,7 +610,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 46, justifyContent: 'center', overflow: 'hidden', - width: 38 + width: 38, }, video: { backgroundColor: theme.centerChannelBg, @@ -618,8 +618,8 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 48, justifyContent: 'center', overflow: 'hidden', - width: 38 - } + width: 38, + }, }; }); diff --git a/share_extension/android/extension_post/index.js b/share_extension/android/extension_post/index.js index 6893718ef..88b77b45d 100644 --- a/share_extension/android/extension_post/index.js +++ b/share_extension/android/extension_post/index.js @@ -21,7 +21,7 @@ function mapStateToProps(state) { maxFileSize: getAllowedServerMaxFileSize(config), teamId: getCurrentTeamId(state), token, - url + url, }; } diff --git a/share_extension/android/extension_post/team_button/index.js b/share_extension/android/extension_post/team_button/index.js index cbb68c4ca..aec7f2f7c 100644 --- a/share_extension/android/extension_post/team_button/index.js +++ b/share_extension/android/extension_post/team_button/index.js @@ -9,7 +9,7 @@ import TeamButton from './team_button'; function mapStateToProps(state, ownProps) { return { - team: getTeam(state, ownProps.teamId) + team: getTeam(state, ownProps.teamId), }; } diff --git a/share_extension/android/extension_post/team_button/team_button.js b/share_extension/android/extension_post/team_button/team_button.js index 7fdb27dfe..0cbf37733 100644 --- a/share_extension/android/extension_post/team_button/team_button.js +++ b/share_extension/android/extension_post/team_button/team_button.js @@ -7,7 +7,7 @@ import {intlShape} from 'react-intl'; import { Text, TouchableHighlight, - View + View, } from 'react-native'; import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme'; @@ -16,11 +16,11 @@ export default class TeamButton extends PureComponent { static propTypes = { team: PropTypes.object.isRequired, theme: PropTypes.object.isRequired, - onPress: PropTypes.func.isRequired + onPress: PropTypes.func.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; render() { @@ -51,26 +51,26 @@ export default class TeamButton extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { flex: { - flex: 1 + flex: 1, }, buttonContainer: { borderTopColor: changeOpacity(theme.centerChannelColor, 0.2), borderTopWidth: 1, height: 70, - paddingHorizontal: 15 + paddingHorizontal: 15, }, buttonWrapper: { alignItems: 'flex-start', - flex: 1 + flex: 1, }, buttonLabel: { fontSize: 16, marginTop: 16, - marginBottom: 3 + marginBottom: 3, }, buttonValue: { color: changeOpacity(theme.centerChannelColor, 0.6), - fontSize: 14 - } + fontSize: 14, + }, }; }); diff --git a/share_extension/android/extension_teams/extension_teams.js b/share_extension/android/extension_teams/extension_teams.js index 46b265cbc..b0131a5ea 100644 --- a/share_extension/android/extension_teams/extension_teams.js +++ b/share_extension/android/extension_teams/extension_teams.js @@ -8,7 +8,7 @@ import {NavigationActions} from 'react-navigation'; import { ActivityIndicator, FlatList, - View + View, } from 'react-native'; import {Preferences} from 'mattermost-redux/constants'; @@ -23,26 +23,26 @@ export default class ExtensionTeam extends PureComponent { static propTypes = { actions: PropTypes.shape({ extensionSelectTeamId: PropTypes.func.isRequired, - getTeamChannels: PropTypes.func.isRequired + getTeamChannels: PropTypes.func.isRequired, }).isRequired, navigation: PropTypes.object.isRequired, - teamIds: PropTypes.array + teamIds: PropTypes.array, }; static defaultProps = { - teamIds: [] + teamIds: [], }; static contextTypes = { - intl: intlShape + intl: intlShape, }; static navigationOptions = ({navigation}) => ({ - title: navigation.state.params.title + title: navigation.state.params.title, }); state = { - loading: false + loading: false, }; handleSelectTeam = async (teamId) => { @@ -116,11 +116,11 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { loadingContainer: { alignItems: 'center', flex: 1, - justifyContent: 'center' + justifyContent: 'center', }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), - height: 1 - } + height: 1, + }, }; }); diff --git a/share_extension/android/extension_teams/index.js b/share_extension/android/extension_teams/index.js index 576a6acee..dd30cbc85 100644 --- a/share_extension/android/extension_teams/index.js +++ b/share_extension/android/extension_teams/index.js @@ -12,7 +12,7 @@ import ExtensionTeams from './extension_teams'; function mapStateToProps(state) { return { - teamIds: getMySortedTeamIds(state) + teamIds: getMySortedTeamIds(state), }; } @@ -20,8 +20,8 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ extensionSelectTeamId, - getTeamChannels - }, dispatch) + getTeamChannels, + }, dispatch), }; } diff --git a/share_extension/android/extension_teams/team_item/index.js b/share_extension/android/extension_teams/team_item/index.js index 6963717b6..e261124bd 100644 --- a/share_extension/android/extension_teams/team_item/index.js +++ b/share_extension/android/extension_teams/team_item/index.js @@ -6,7 +6,7 @@ import TeamItem from './team_item'; function mapStateToProps(state, ownProps) { return { - team: getTeam(state, ownProps.teamId) + team: getTeam(state, ownProps.teamId), }; } diff --git a/share_extension/android/extension_teams/team_item/team_item.js b/share_extension/android/extension_teams/team_item/team_item.js index 022de34eb..7a49f7eb7 100644 --- a/share_extension/android/extension_teams/team_item/team_item.js +++ b/share_extension/android/extension_teams/team_item/team_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Text, TouchableHighlight, - View + View, } from 'react-native'; import IonIcon from 'react-native-vector-icons/Ionicons'; @@ -18,7 +18,7 @@ export default class TeamItem extends PureComponent { currentTeamId: PropTypes.string.isRequired, onSelectTeam: PropTypes.func.isRequired, team: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; onPress = wrapWithPreventDoubleTap(() => { @@ -30,7 +30,7 @@ export default class TeamItem extends PureComponent { const { currentTeamId, team, - theme + theme, } = this.props; const styles = getStyleSheet(theme); @@ -83,19 +83,19 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flex: 1, flexDirection: 'row', height: 45, - paddingHorizontal: 15 + paddingHorizontal: 15, }, item: { alignItems: 'center', height: 45, flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, text: { color: theme.centerChannelColor, flex: 1, fontSize: 16, - paddingRight: 5 + paddingRight: 5, }, iconContainer: { alignItems: 'center', @@ -104,20 +104,20 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 30, justifyContent: 'center', width: 30, - marginRight: 10 + marginRight: 10, }, icon: { color: theme.sidebarText, fontFamily: 'OpenSans', fontSize: 15, - fontWeight: '600' + fontWeight: '600', }, checkmarkContainer: { - alignItems: 'flex-end' + alignItems: 'flex-end', }, checkmark: { color: theme.linkColor, - fontSize: 16 - } + fontSize: 16, + }, }; }); diff --git a/share_extension/android/navigation.js b/share_extension/android/navigation.js index d3fc523b9..e4fcdd9d1 100644 --- a/share_extension/android/navigation.js +++ b/share_extension/android/navigation.js @@ -12,30 +12,30 @@ import ExtensionTeams from './extension_teams'; const theme = Preferences.THEMES.default; const Navigation = stackNavigator({ Post: { - screen: ExtensionPost + screen: ExtensionPost, }, Teams: { - screen: ExtensionTeams + screen: ExtensionTeams, }, Channels: { - screen: ExtensionChannels - } + screen: ExtensionChannels, + }, }, { navigationOptions: { headerStyle: { - backgroundColor: theme.sidebarHeaderBg + backgroundColor: theme.sidebarHeaderBg, }, headerTitleStyle: { marginHorizontal: 0, left: 0, - color: theme.sidebarHeaderTextColor + color: theme.sidebarHeaderTextColor, }, headerBackTitleStyle: { color: theme.sidebarHeaderTextColor, - margin: 0 + margin: 0, }, - headerTintColor: theme.sidebarHeaderTextColor - } + headerTintColor: theme.sidebarHeaderTextColor, + }, }); export default Navigation; diff --git a/share_extension/android/selectors/index.js b/share_extension/android/selectors/index.js index a3e100f25..a10eb5329 100644 --- a/share_extension/android/selectors/index.js +++ b/share_extension/android/selectors/index.js @@ -12,7 +12,7 @@ import { getMyPreferences, getTeammateNameDisplaySetting, getVisibleTeammate, - getVisibleGroupIds + getVisibleGroupIds, } from 'mattermost-redux/selectors/entities/preferences'; import { @@ -21,7 +21,7 @@ import { getGroupDisplayNameFromUserIds, getUserIdFromChannelName, isAutoClosed, - sortChannelsByDisplayName + sortChannelsByDisplayName, } from 'mattermost-redux/utils/channel_utils'; import {createIdsSelector} from 'mattermost-redux/utils/helpers'; @@ -141,7 +141,7 @@ function completeDirectGroupInfo(currentUserId, profiles, profilesInChannel, tea if (profilesIds) { return Object.assign(gm, { - display_name: getGroupDisplayNameFromUserIds(profilesIds, profiles, currentUserId, teammateNameDisplay) + display_name: getGroupDisplayNameFromUserIds(profilesIds, profiles, currentUserId, teammateNameDisplay), }); } @@ -156,7 +156,7 @@ function completeDirectGroupInfo(currentUserId, profiles, profilesInChannel, tea }); if (usernames.length === userIds.length) { return Object.assign(gm, { - display_name: getGroupDisplayNameFromUserIds(userIds, profiles, currentUserId, teammateNameDisplay) + display_name: getGroupDisplayNameFromUserIds(userIds, profiles, currentUserId, teammateNameDisplay), }); } diff --git a/share_extension/common/icons/channel_type.js b/share_extension/common/icons/channel_type.js index caf60f50e..50fe92bed 100644 --- a/share_extension/common/icons/channel_type.js +++ b/share_extension/common/icons/channel_type.js @@ -3,7 +3,7 @@ import React from 'react'; import { - View + View, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; @@ -61,12 +61,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { container: { height: 16, marginRight: 5, - width: 16 + width: 16, }, icon: { color: theme.centerChannelColor, - fontSize: 16 - } + fontSize: 16, + }, }; }); diff --git a/share_extension/common/icons/excel.js b/share_extension/common/icons/excel.js index e3354b31d..4da5000ad 100644 --- a/share_extension/common/icons/excel.js +++ b/share_extension/common/icons/excel.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { G, - Path + Path, } from 'react-native-svg'; function ExcelSvg({height, width}) { @@ -49,7 +49,7 @@ function ExcelSvg({height, width}) { ExcelSvg.propTypes = { height: PropTypes.number.isRequired, - width: PropTypes.number.isRequired + width: PropTypes.number.isRequired, }; export default ExcelSvg; diff --git a/share_extension/common/icons/generic.js b/share_extension/common/icons/generic.js index 7a35de926..5a016ffbc 100644 --- a/share_extension/common/icons/generic.js +++ b/share_extension/common/icons/generic.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { G, - Path + Path, } from 'react-native-svg'; function GenericSvg({height, width}) { @@ -52,7 +52,7 @@ function GenericSvg({height, width}) { GenericSvg.propTypes = { height: PropTypes.number.isRequired, - width: PropTypes.number.isRequired + width: PropTypes.number.isRequired, }; export default GenericSvg; diff --git a/share_extension/common/icons/pdf.js b/share_extension/common/icons/pdf.js index ff4458d56..1b8698b86 100644 --- a/share_extension/common/icons/pdf.js +++ b/share_extension/common/icons/pdf.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { G, - Path + Path, } from 'react-native-svg'; function PdfSvg({height, width}) { @@ -47,7 +47,7 @@ function PdfSvg({height, width}) { PdfSvg.propTypes = { height: PropTypes.number.isRequired, - width: PropTypes.number.isRequired + width: PropTypes.number.isRequired, }; export default PdfSvg; diff --git a/share_extension/common/icons/ppt.js b/share_extension/common/icons/ppt.js index dcd0ba965..4909b956e 100644 --- a/share_extension/common/icons/ppt.js +++ b/share_extension/common/icons/ppt.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { G, - Path + Path, } from 'react-native-svg'; function PptSvg({height, width}) { @@ -49,7 +49,7 @@ function PptSvg({height, width}) { PptSvg.propTypes = { height: PropTypes.number.isRequired, - width: PropTypes.number.isRequired + width: PropTypes.number.isRequired, }; export default PptSvg; diff --git a/share_extension/common/icons/zip.js b/share_extension/common/icons/zip.js index 0c4ef4cd4..77a17a29c 100644 --- a/share_extension/common/icons/zip.js +++ b/share_extension/common/icons/zip.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {View} from 'react-native'; import Svg, { G, - Path + Path, } from 'react-native-svg'; function ZipSvg({height, width}) { @@ -62,7 +62,7 @@ function ZipSvg({height, width}) { ZipSvg.propTypes = { height: PropTypes.number.isRequired, - width: PropTypes.number.isRequired + width: PropTypes.number.isRequired, }; export default ZipSvg; diff --git a/share_extension/ios/extension_channels.js b/share_extension/ios/extension_channels.js index 73c3252e3..fb69dd52e 100644 --- a/share_extension/ios/extension_channels.js +++ b/share_extension/ios/extension_channels.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { ActivityIndicator, Text, - View + View, } from 'react-native'; import DeviceInfo from 'react-native-device-info'; import {intlShape} from 'react-intl'; @@ -29,15 +29,15 @@ export default class ExtensionChannels extends PureComponent { onSelectChannel: PropTypes.func.isRequired, teamId: PropTypes.string.isRequired, theme: PropTypes.object.isRequired, - title: PropTypes.string.isRequired + title: PropTypes.string.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; state = { - sections: null + sections: null, }; componentWillMount() { @@ -72,7 +72,7 @@ export default class ExtensionChannels extends PureComponent { sections.push({ id: 'sidebar.channels', defaultMessage: 'PUBLIC CHANNELS', - data: publicChannels.sort(this.sortDisplayName) + data: publicChannels.sort(this.sortDisplayName), }); } @@ -80,7 +80,7 @@ export default class ExtensionChannels extends PureComponent { sections.push({ id: 'sidebar.pg', defaultMessage: 'PRIVATE CHANNELS', - data: privateChannels.sort(this.sortDisplayName) + data: privateChannels.sort(this.sortDisplayName), }); } @@ -88,7 +88,7 @@ export default class ExtensionChannels extends PureComponent { sections.push({ id: 'sidebar.direct', defaultMessage: 'DIRECT MESSAGES', - data: directChannels.sort(this.sortDisplayName) + data: directChannels.sort(this.sortDisplayName), }); } @@ -118,7 +118,7 @@ export default class ExtensionChannels extends PureComponent { Icon.getImageSource('globe', 16, this.props.theme.centerChannelColor), Icon.getImageSource('lock', 16, this.props.theme.centerChannelColor), Icon.getImageSource('user', 16, this.props.theme.centerChannelColor), - Icon.getImageSource('users', 16, this.props.theme.centerChannelColor) + Icon.getImageSource('users', 16, this.props.theme.centerChannelColor), ]); this.publicChannelIcon = icons[0]; @@ -127,7 +127,7 @@ export default class ExtensionChannels extends PureComponent { this.gmChannelIcon = icons[3]; this.setState({ - channels + channels, }, () => { this.buildSections(); }); @@ -302,48 +302,48 @@ export default class ExtensionChannels extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { flex: { - flex: 1 + flex: 1, }, separatorContainer: { - paddingLeft: 35 + paddingLeft: 35, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), - height: 1 + height: 1, }, loadingContainer: { alignItems: 'center', flex: 1, - justifyContent: 'center' + justifyContent: 'center', }, searchContainer: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), paddingBottom: 2, - paddingHorizontal: 5 + paddingHorizontal: 5, }, searchBarInput: { backgroundColor: '#fff', color: theme.centerChannelColor, - fontSize: 15 + fontSize: 15, }, titleContainer: { - height: 30 + height: 30, }, title: { color: changeOpacity(theme.centerChannelColor, 0.6), fontSize: 15, lineHeight: 30, - paddingHorizontal: 15 + paddingHorizontal: 15, }, errorContainer: { alignItems: 'center', flex: 1, justifyContent: 'center', - paddingHorizontal: 15 + paddingHorizontal: 15, }, error: { color: theme.errorTextColor, - fontSize: 14 - } + fontSize: 14, + }, }; }); diff --git a/share_extension/ios/extension_nav_bar.js b/share_extension/ios/extension_nav_bar.js index fa3510f21..d48c03d08 100644 --- a/share_extension/ios/extension_nav_bar.js +++ b/share_extension/ios/extension_nav_bar.js @@ -18,13 +18,13 @@ export default class ExtensionNavBar extends PureComponent { onRightButtonPress: PropTypes.func, rightButtonTitle: PropTypes.string, theme: PropTypes.object.isRequired, - title: PropTypes.string + title: PropTypes.string, }; static defaultProps = { backButton: false, onLeftButtonPress: emptyFunction, - title: 'Mattermost' + title: 'Mattermost', }; renderLeftButton = (styles) => { @@ -110,40 +110,40 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { borderBottomColor: changeOpacity(theme.centerChannelColor, 0.2), borderBottomWidth: 1, flexDirection: 'row', - height: 45 + height: 45, }, backButtonContainer: { justifyContent: 'center', paddingHorizontal: 15, - width: '30%' + width: '30%', }, titleContainer: { alignItems: 'center', flex: 1, - justifyContent: 'center' + justifyContent: 'center', }, backButton: { color: theme.linkColor, - fontSize: 34 + fontSize: 34, }, leftButton: { color: theme.linkColor, - fontSize: 16 + fontSize: 16, }, title: { fontSize: 17, - fontWeight: '600' + fontWeight: '600', }, rightButtonContainer: { alignItems: 'flex-end', justifyContent: 'center', paddingHorizontal: 15, - width: '30%' + width: '30%', }, rightButton: { color: theme.linkColor, fontSize: 16, - fontWeight: '600' - } + fontWeight: '600', + }, }; }); diff --git a/share_extension/ios/extension_post.js b/share_extension/ios/extension_post.js index 0e20ed75b..866f0ff99 100644 --- a/share_extension/ios/extension_post.js +++ b/share_extension/ios/extension_post.js @@ -13,7 +13,7 @@ import { Text, TextInput, TouchableHighlight, - View + View, } from 'react-native'; import IonIcon from 'react-native-vector-icons/Ionicons'; import Video from 'react-native-video'; @@ -36,7 +36,7 @@ import { GenericSvg, PdfSvg, PptSvg, - ZipSvg + ZipSvg, } from 'share_extension/common/icons'; import ExtensionChannels from './extension_channels'; @@ -55,7 +55,7 @@ const extensionSvg = { pptx: PptSvg, xls: ExcelSvg, xlsx: ExcelSvg, - zip: ZipSvg + zip: ZipSvg, }; export default class ExtensionPost extends PureComponent { @@ -64,11 +64,11 @@ export default class ExtensionPost extends PureComponent { entities: PropTypes.object, navigator: PropTypes.object.isRequired, onClose: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; constructor(props, context) { @@ -84,7 +84,7 @@ export default class ExtensionPost extends PureComponent { isLandscape, totalSize: 0, value: '', - sending: false + sending: false, }; } @@ -108,10 +108,10 @@ export default class ExtensionPost extends PureComponent { await LocalAuth.authenticate({ reason: intl.formatMessage({ id: 'mobile.managed.secured_by', - defaultMessage: 'Secured by {vendor}' + defaultMessage: 'Secured by {vendor}', }, {emmSecured}), fallbackToPasscode: true, - suppressEnterPassword: true + suppressEnterPassword: true, }); } } catch (error) { @@ -141,7 +141,7 @@ export default class ExtensionPost extends PureComponent { component: ExtensionChannels, wrapperStyle: { borderRadius: 10, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, passProps: { currentChannelId: channel.id, @@ -149,8 +149,8 @@ export default class ExtensionPost extends PureComponent { onSelectChannel: this.selectChannel, teamId: team.id, theme, - title: team.display_name - } + title: team.display_name, + }, }); }); @@ -164,14 +164,14 @@ export default class ExtensionPost extends PureComponent { title: formatMessage({id: 'quick_switch_modal.teams', defaultMessage: 'Teams'}), wrapperStyle: { borderRadius: 10, - backgroundColor: theme.centerChannelBg + backgroundColor: theme.centerChannelBg, }, passProps: { entities: this.state.entities, currentTeamId: team.id, onSelectTeam: this.selectTeam, - theme - } + theme, + }, }); }); @@ -225,7 +225,7 @@ export default class ExtensionPost extends PureComponent { fullPath, mimeType: lookupMimeType(filename.toLowerCase()), size: getFormattedFileSize(fileSize), - type: item.type + type: item.type, }); break; } @@ -275,7 +275,7 @@ export default class ExtensionPost extends PureComponent { {formatMessage({ id: 'mobile.extension.posting', - defaultMessage: 'Posting...' + defaultMessage: 'Posting...', })} @@ -288,7 +288,7 @@ export default class ExtensionPost extends PureComponent { {formatMessage({ id: 'mobile.extension.max_file_size', - defaultMessage: 'File attachments shared in Mattermost must be less than {size}.' + defaultMessage: 'File attachments shared in Mattermost must be less than {size}.', }, {size: getFormattedFileSize({size: maxSize})})} @@ -332,7 +332,7 @@ export default class ExtensionPost extends PureComponent { {formatMessage({ id: 'mobile.extension.authentication_required', - defaultMessage: 'Authentication required: Please first login using the app.' + defaultMessage: 'Authentication required: Please first login using the app.', })} @@ -557,13 +557,13 @@ export default class ExtensionPost extends PureComponent { const post = { user_id: currentUserId, channel_id: channel.id, - message: value + message: value, }; const data = { files, post, - requestId: generateId() + requestId: generateId(), }; this.setState({sending: true}); @@ -584,8 +584,8 @@ export default class ExtensionPost extends PureComponent { channels: { ...entities.channels, channels: {...entities.channels.channels}, - channelsInTeam: {...entities.channels.channelsInTeam} - } + channelsInTeam: {...entities.channels.channelsInTeam}, + }, }; const {channels, channelsInTeam} = newEntities.channels; @@ -640,71 +640,71 @@ export default class ExtensionPost extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { flex: { - flex: 1 + flex: 1, }, container: { flex: 1, - backgroundColor: changeOpacity(theme.centerChannelColor, 0.05) + backgroundColor: changeOpacity(theme.centerChannelColor, 0.05), }, input: { color: theme.centerChannelColor, fontSize: 17, marginBottom: 5, - width: '100%' + width: '100%', }, divider: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.1), height: 1, marginVertical: 5, - width: '100%' + width: '100%', }, scrollView: { - paddingHorizontal: 15 + paddingHorizontal: 15, }, buttonContainer: { borderTopColor: changeOpacity(theme.centerChannelColor, 0.2), borderTopWidth: 1, height: 45, - paddingHorizontal: 15 + paddingHorizontal: 15, }, buttonWrapper: { alignItems: 'center', flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, buttonLabelContainer: { - flex: 1 + flex: 1, }, buttonLabel: { fontSize: 17, - lineHeight: 45 + lineHeight: 45, }, buttonValueContainer: { justifyContent: 'flex-end', flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, buttonValue: { color: changeOpacity(theme.centerChannelColor, 0.4), alignSelf: 'flex-end', fontSize: 17, - lineHeight: 45 + lineHeight: 45, }, arrowContainer: { height: 45, justifyContent: 'center', marginLeft: 15, - top: 2 + top: 2, }, unauthenticatedContainer: { alignItems: 'center', flex: 1, justifyContent: 'center', - paddingHorizontal: 15 + paddingHorizontal: 15, }, unauthenticated: { color: theme.errorTextColor, - fontSize: 14 + fontSize: 14, }, fileContainer: { alignItems: 'center', @@ -715,12 +715,12 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { flexDirection: 'row', height: 48, marginBottom: 10, - width: '100%' + width: '100%', }, filename: { color: changeOpacity(theme.centerChannelColor, 0.5), fontSize: 13, - flex: 1 + flex: 1, }, otherContainer: { borderBottomLeftRadius: 4, @@ -728,31 +728,31 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 48, marginRight: 10, paddingVertical: 10, - width: 38 + width: 38, }, otherWrapper: { borderRightWidth: 1, borderRightColor: changeOpacity(theme.centerChannelColor, 0.2), - flex: 1 + flex: 1, }, fileIcon: { alignItems: 'center', justifyContent: 'center', - flex: 1 + flex: 1, }, imageContainer: { borderBottomLeftRadius: 4, borderTopLeftRadius: 4, height: 48, marginRight: 10, - width: 38 + width: 38, }, image: { alignItems: 'center', height: 48, justifyContent: 'center', overflow: 'hidden', - width: 38 + width: 38, }, video: { backgroundColor: theme.centerChannelBg, @@ -760,18 +760,18 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 48, justifyContent: 'center', overflow: 'hidden', - width: 38 + width: 38, }, sendingContainer: { alignItems: 'center', flex: 1, justifyContent: 'center', - paddingHorizontal: 15 + paddingHorizontal: 15, }, sendingText: { color: theme.centerChannelColor, fontSize: 16, - paddingTop: 10 - } + paddingTop: 10, + }, }; }); diff --git a/share_extension/ios/extension_team_item.js b/share_extension/ios/extension_team_item.js index 744f5eaa3..a2bcf8e85 100644 --- a/share_extension/ios/extension_team_item.js +++ b/share_extension/ios/extension_team_item.js @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import { Text, TouchableHighlight, - View + View, } from 'react-native'; import {wrapWithPreventDoubleTap} from 'app/utils/tap'; @@ -17,7 +17,7 @@ export default class TeamsListItem extends React.PureComponent { currentTeamId: PropTypes.string.isRequired, onSelectTeam: PropTypes.func.isRequired, team: PropTypes.object.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; onPress = wrapWithPreventDoubleTap(() => { @@ -29,7 +29,7 @@ export default class TeamsListItem extends React.PureComponent { const { currentTeamId, team, - theme + theme, } = this.props; const styles = getStyleSheet(theme); @@ -44,7 +44,7 @@ export default class TeamsListItem extends React.PureComponent { const wrapperStyle = [styles.wrapper]; if (team.id === currentTeamId) { wrapperStyle.push({ - width: '90%' + width: '90%', }); } @@ -75,19 +75,19 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { wrapper: { height: 45, - width: '100%' + width: '100%', }, container: { flex: 1, flexDirection: 'row', height: 45, - paddingHorizontal: 15 + paddingHorizontal: 15, }, item: { alignItems: 'center', height: 45, flex: 1, - flexDirection: 'row' + flexDirection: 'row', }, text: { color: theme.centerChannelColor, @@ -95,7 +95,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { fontSize: 16, fontWeight: '600', lineHeight: 16, - paddingRight: 5 + paddingRight: 5, }, iconContainer: { alignItems: 'center', @@ -104,20 +104,20 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { height: 30, justifyContent: 'center', width: 30, - marginRight: 10 + marginRight: 10, }, icon: { color: theme.sidebarText, fontFamily: 'OpenSans', fontSize: 15, - fontWeight: '600' + fontWeight: '600', }, checkmarkContainer: { - alignItems: 'flex-end' + alignItems: 'flex-end', }, checkmark: { color: theme.linkColor, - fontSize: 16 - } + fontSize: 16, + }, }; }); diff --git a/share_extension/ios/extension_teams.js b/share_extension/ios/extension_teams.js index 8455df644..d0e8ed58e 100644 --- a/share_extension/ios/extension_teams.js +++ b/share_extension/ios/extension_teams.js @@ -22,17 +22,17 @@ export default class ExtensionTeams extends PureComponent { entities: PropTypes.object, navigator: PropTypes.object.isRequired, onSelectTeam: PropTypes.func.isRequired, - theme: PropTypes.object.isRequired + theme: PropTypes.object.isRequired, }; static contextTypes = { - intl: intlShape + intl: intlShape, }; state = { defaultChannels: null, error: null, - myTeams: null + myTeams: null, }; componentWillMount() { @@ -76,7 +76,7 @@ export default class ExtensionTeams extends PureComponent { this.setState({ defaultChannels, - myTeams: myTeams.sort(this.sortDisplayName) + myTeams: myTeams.sort(this.sortDisplayName), }); } catch (error) { this.setState({error}); @@ -173,47 +173,47 @@ export default class ExtensionTeams extends PureComponent { const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { flex: { - flex: 1 + flex: 1, }, separatorContainer: { - paddingLeft: 60 + paddingLeft: 60, }, separator: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), - height: 1 + height: 1, }, loadingContainer: { alignItems: 'center', flex: 1, - justifyContent: 'center' + justifyContent: 'center', }, searchContainer: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.2), - paddingBottom: 2 + paddingBottom: 2, }, searchBarInput: { backgroundColor: '#fff', color: theme.centerChannelColor, - fontSize: 15 + fontSize: 15, }, titleContainer: { - height: 30 + height: 30, }, title: { color: changeOpacity(theme.centerChannelColor, 0.6), fontSize: 15, lineHeight: 30, - paddingHorizontal: 15 + paddingHorizontal: 15, }, errorContainer: { alignItems: 'center', flex: 1, justifyContent: 'center', - paddingHorizontal: 15 + paddingHorizontal: 15, }, error: { color: theme.errorTextColor, - fontSize: 14 - } + fontSize: 14, + }, }; }); diff --git a/share_extension/ios/index.js b/share_extension/ios/index.js index 86d0081ae..605d47e99 100644 --- a/share_extension/ios/index.js +++ b/share_extension/ios/index.js @@ -10,7 +10,7 @@ import { NativeModules, NavigatorIOS, StyleSheet, - View + View, } from 'react-native'; import {Preferences} from 'mattermost-redux/constants'; @@ -34,7 +34,7 @@ export default class SharedApp extends PureComponent { this.state = { backdropOpacity: new Animated.Value(0), containerOpacity: new Animated.Value(0), - isLandscape + isLandscape, }; mattermostBucket.readFromFile('entities', Config.AppGroupId).then((value) => { @@ -49,14 +49,14 @@ export default class SharedApp extends PureComponent { this.state.backdropOpacity, { toValue: 0.5, - duration: 100 + duration: 100, }), Animated.timing( this.state.containerOpacity, { toValue: 1, - duration: 250 - }) + duration: 250, + }), ]).start(); } @@ -95,12 +95,12 @@ export default class SharedApp extends PureComponent { entities: this.entities, onClose: this.onClose, isLandscape, - theme + theme, }, wrapperStyle: { borderRadius: 10, - backgroundColor: theme.centerChannelBg - } + backgroundColor: theme.centerChannelBg, + }, }; return ( @@ -120,8 +120,8 @@ export default class SharedApp extends PureComponent { { opacity: this.state.containerOpacity, height: this.userIsLoggedIn() ? 250 : 130, - top: isLandscape ? 20 : 65 - } + top: isLandscape ? 20 : 65, + }, ]} > { assert.deepEqual(store.getState().views.thread, { drafts: { 1234: { - draft: 'draft1' - } - } + draft: 'draft1', + }, + }, }); await ThreadActions.handleCommentDraftChanged('1235', 'draft2')(store.dispatch, store.getState); @@ -28,12 +28,12 @@ describe('Actions.Views.Thread', () => { assert.deepEqual(store.getState().views.thread, { drafts: { 1234: { - draft: 'draft1' + draft: 'draft1', }, 1235: { - draft: 'draft2' - } - } + draft: 'draft2', + }, + }, }); await ThreadActions.handleCommentDraftChanged('1235', 'draft3')(store.dispatch, store.getState); @@ -41,12 +41,12 @@ describe('Actions.Views.Thread', () => { assert.deepEqual(store.getState().views.thread, { drafts: { 1234: { - draft: 'draft1' + draft: 'draft1', }, 1235: { - draft: 'draft3' - } - } + draft: 'draft3', + }, + }, }); }); }); diff --git a/test/app/components/markdown/transform.test.js b/test/app/components/markdown/transform.test.js index 12befa5a1..c70ba11d7 100644 --- a/test/app/components/markdown/transform.test.js +++ b/test/app/components/markdown/transform.test.js @@ -6,7 +6,7 @@ import {Node, Parser} from 'commonmark'; import { addListItemIndices, - pullOutImages + pullOutImages, } from 'app/components/markdown/transform'; describe('Components.Markdown.transform', () => { @@ -26,20 +26,20 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', children: [{ type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] - }] + literal: 'two', + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -54,9 +54,9 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', index: 2, @@ -64,11 +64,11 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] - }] + literal: 'two', + }], + }], + }], + }], }); const actual = addListItemIndices(input); @@ -91,20 +91,20 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', children: [{ type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] - }] + literal: 'two', + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -121,9 +121,9 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', index: 8, @@ -131,11 +131,11 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] - }] + literal: 'two', + }], + }], + }], + }], }); const actual = addListItemIndices(input); @@ -166,9 +166,9 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', children: [{ @@ -180,32 +180,32 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', children: [{ type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] - }] - }] - }] + literal: 'two', + }], + }], + }], + }], + }], + }], }, { type: 'item', children: [{ type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] + literal: 'two', + }], + }], + }], }, { type: 'list', listTight: true, @@ -215,20 +215,20 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', children: [{ type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] - }] + literal: 'two', + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -254,9 +254,9 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', index: 4, @@ -270,9 +270,9 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', index: 2, @@ -280,13 +280,13 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] - }] - }] - }] + literal: 'two', + }], + }], + }], + }], + }], + }], }, { type: 'item', index: 8, @@ -294,10 +294,10 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] + literal: 'two', + }], + }], + }], }, { type: 'list', listTight: true, @@ -308,9 +308,9 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'one' - }] - }] + literal: 'one', + }], + }], }, { type: 'item', index: 2, @@ -318,11 +318,11 @@ describe('Components.Markdown.transform', () => { type: 'pargraph', children: [{ type: 'text', - literal: 'two' - }] - }] - }] - }] + literal: 'two', + }], + }], + }], + }], }); const actual = addListItemIndices(input); @@ -363,24 +363,24 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] - }] + literal: 'an image', + }], + }], + }], }); const expected = makeAst({ type: 'document', children: [{ type: 'paragraph', - children: [] + children: [], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] + literal: 'an image', + }], + }], }); const actual = pullOutImages(input); @@ -396,19 +396,19 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text with ' + literal: 'This is text with ', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'text', - literal: ' in it' - }] - }] + literal: ' in it', + }], + }], }); const expected = makeAst({ type: 'document', @@ -416,23 +416,23 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text with ' - }] + literal: 'This is text with ', + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'paragraph', continue: true, children: [{ type: 'text', - literal: 'in it' // Note that we remove the preceding whitespace - }] - }] + literal: 'in it', // Note that we remove the preceding whitespace + }], + }], }); const actual = pullOutImages(input); @@ -451,42 +451,42 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'image', destination: 'http://example.com/image2', children: [{ type: 'text', - literal: 'another image' - }] - }] - }] + literal: 'another image', + }], + }], + }], }); const expected = makeAst({ type: 'document', children: [{ type: 'paragraph', - children: [] + children: [], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'paragraph', continue: true, - children: [] + children: [], }, { type: 'image', destination: 'http://example.com/image2', children: [{ type: 'text', - literal: 'another image' - }] - }] + literal: 'another image', + }], + }], }); const actual = pullOutImages(input); @@ -503,15 +503,15 @@ describe('Components.Markdown.transform', () => { level: 1, children: [{ type: 'text', - literal: 'This is the start 1' + literal: 'This is the start 1', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 1' - }] - }] + literal: 'an image 1', + }], + }], }, { type: 'heading', level: 4, @@ -520,29 +520,29 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 2' - }] + literal: 'an image 2', + }], }, { type: 'text', - literal: 'This is the end 2' - }] + literal: 'This is the end 2', + }], }, { type: 'heading', level: 2, children: [{ type: 'text', - literal: 'This is the start 3' + literal: 'This is the start 3', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 3' - }] + literal: 'an image 3', + }], }, { type: 'text', - literal: 'This is the end 3' - }] + literal: 'This is the end 3', + }], }, { type: 'heading', level: 3, @@ -551,17 +551,17 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 4a' - }] + literal: 'an image 4a', + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 4b' - }] - }] - }] + literal: 'an image 4b', + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -570,80 +570,80 @@ describe('Components.Markdown.transform', () => { level: 1, children: [{ type: 'text', - literal: 'This is the start 1' - }] + literal: 'This is the start 1', + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 1' - }] + literal: 'an image 1', + }], }, { type: 'heading', level: 4, - children: [] + children: [], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 2' - }] + literal: 'an image 2', + }], }, { type: 'heading', level: 4, continue: true, children: [{ type: 'text', - literal: 'This is the end 2' - }] + literal: 'This is the end 2', + }], }, { type: 'heading', level: 2, children: [{ type: 'text', - literal: 'This is the start 3' - }] + literal: 'This is the start 3', + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 3' - }] + literal: 'an image 3', + }], }, { type: 'heading', level: 2, continue: true, children: [{ type: 'text', - literal: 'This is the end 3' - }] + literal: 'This is the end 3', + }], }, { type: 'heading', level: 3, - children: [] + children: [], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 4a' - }] + literal: 'an image 4a', + }], }, { type: 'heading', level: 3, continue: true, - children: [] + children: [], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image 4b' - }] - }] + literal: 'an image 4b', + }], + }], }); const actual = pullOutImages(input); @@ -664,11 +664,11 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] - }] - }] + literal: 'an image', + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -676,16 +676,16 @@ describe('Components.Markdown.transform', () => { type: 'block_quote', children: [{ type: 'paragraph', - children: [] - }] + children: [], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] + literal: 'an image', + }], + }], }); const actual = pullOutImages(input); @@ -703,20 +703,20 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is ' + literal: 'This is ', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'text', - literal: ' in a sentence' - }] - }] - }] + literal: ' in a sentence', + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -726,16 +726,16 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is ' - }] - }] + literal: 'This is ', + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'block_quote', continue: true, @@ -744,10 +744,10 @@ describe('Components.Markdown.transform', () => { continue: true, children: [{ type: 'text', - literal: 'in a sentence' - }] - }] - }] + literal: 'in a sentence', + }], + }], + }], }); const actual = pullOutImages(input); @@ -770,9 +770,9 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 2, @@ -783,10 +783,10 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] - }] + literal: 'an image', + }], + }], + }], }, { type: 'item', index: 3, @@ -794,11 +794,11 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is moretext' - }] - }] - }] - }] + literal: 'This is moretext', + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -813,24 +813,24 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 2, children: [{ type: 'paragraph', - children: [] - }] - }] + children: [], + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'list', listType: 'bullet', @@ -843,11 +843,11 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is moretext' - }] - }] - }] - }] + literal: 'This is moretext', + }], + }], + }], + }], }); const actual = pullOutImages(input); @@ -870,9 +870,9 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 8, @@ -883,12 +883,12 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] - }] - }] - }] + literal: 'an image', + }], + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -903,25 +903,25 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 8, children: [{ type: 'paragraph', - children: [] - }] - }] + children: [], + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] + literal: 'an image', + }], + }], }); const actual = pullOutImages(input); @@ -944,9 +944,9 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 8, @@ -954,26 +954,26 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' + literal: 'This is text', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 9, @@ -981,15 +981,15 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] + literal: 'This is text', + }], }, { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 10, @@ -1000,10 +1000,10 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] - }] + literal: 'an image', + }], + }], + }], }, { type: 'item', index: 11, @@ -1011,11 +1011,11 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] - }] - }] + literal: 'This is text', + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -1030,9 +1030,9 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 8, @@ -1040,17 +1040,17 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] - }] + literal: 'This is text', + }], + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'list', listType: 'ordered', @@ -1062,16 +1062,16 @@ describe('Components.Markdown.transform', () => { continue: true, children: [{ type: 'paragraph', - continue: true - }] - }] + continue: true, + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'list', listType: 'ordered', @@ -1086,9 +1086,9 @@ describe('Components.Markdown.transform', () => { continue: true, children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 9, @@ -1096,30 +1096,30 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] + literal: 'This is text', + }], }, { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 10, children: [{ type: 'paragraph', - children: [] - }] - }] + children: [], + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'list', listType: 'ordered', @@ -1132,11 +1132,11 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] - }] - }] + literal: 'This is text', + }], + }], + }], + }], }); const actual = pullOutImages(input); @@ -1166,16 +1166,16 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' + literal: 'This is text', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] - }] + literal: 'an image', + }], + }], + }], }, { type: 'item', index: 4, @@ -1186,15 +1186,15 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'text', - literal: 'This is text' - }] - }] - }] - }] + literal: 'This is text', + }], + }], + }], + }], }, { type: 'item', index: 2, @@ -1212,13 +1212,13 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 2, @@ -1226,20 +1226,20 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' + literal: 'This is text', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] - }] - }] - }] - }] - }] + literal: 'an image', + }], + }], + }], + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -1261,19 +1261,19 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] - }] - }] - }] + literal: 'This is text', + }], + }], + }], + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'list', listType: 'ordered', @@ -1293,18 +1293,18 @@ describe('Components.Markdown.transform', () => { index: 4, children: [{ type: 'paragraph', - children: [] - }] - }] - }] - }] + children: [], + }], + }], + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'list', listType: 'ordered', @@ -1328,11 +1328,11 @@ describe('Components.Markdown.transform', () => { continue: true, children: [{ type: 'text', - literal: 'This is text' - }] - }] - }] - }] + literal: 'This is text', + }], + }], + }], + }], }, { type: 'item', index: 2, @@ -1345,18 +1345,18 @@ describe('Components.Markdown.transform', () => { index: 1, children: [{ type: 'paragraph', - children: [] - }] - }] - }] - }] + children: [], + }], + }], + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'list', listType: 'ordered', @@ -1380,9 +1380,9 @@ describe('Components.Markdown.transform', () => { continue: true, children: [{ type: 'text', - literal: 'This is text' - }] - }] + literal: 'This is text', + }], + }], }, { type: 'item', index: 2, @@ -1390,20 +1390,20 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', children: [{ type: 'text', - literal: 'This is text' - }] - }] - }] - }] - }] + literal: 'This is text', + }], + }], + }], + }], + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] + literal: 'an image', + }], + }], }); const actual = pullOutImages(input); @@ -1429,9 +1429,9 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/abc', children: [{ type: 'text', - literal: 'abc' - }] - }] + literal: 'abc', + }], + }], }, { type: 'list', listType: 'numbered', @@ -1446,10 +1446,10 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/def', children: [{ type: 'text', - literal: 'def' - }] - }] - }] + literal: 'def', + }], + }], + }], }, { type: 'item', index: 2, @@ -1460,14 +1460,14 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/ghi', children: [{ type: 'text', - literal: 'ghi' - }] - }] - }] - }] - }] + literal: 'ghi', + }], + }], + }], + }], + }], - }] + }], }, { type: 'list', listType: 'ordered', @@ -1482,11 +1482,11 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/jkl', children: [{ type: 'text', - literal: 'jkl' - }] - }] - }] - }] + literal: 'jkl', + }], + }], + }], + }], }, { type: 'block_quote', children: [{ @@ -1496,21 +1496,21 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/mno', children: [{ type: 'text', - literal: 'mno' - }] + literal: 'mno', + }], }, { - type: 'softbreak' + type: 'softbreak', }, { type: 'image', destination: 'http://example.com/pqr', children: [{ type: 'text', - literal: 'pqr' - }] - }] - }] + literal: 'pqr', + }], + }], + }], }, { - type: 'thematic_break' + type: 'thematic_break', }, { type: 'heading', level: 1, @@ -1519,16 +1519,16 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'vw' - }] + literal: 'vw', + }], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'x' - }] - }] + literal: 'x', + }], + }], }, { type: 'paragraph', children: [{ @@ -1536,10 +1536,10 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'yz' - }] - }] - }] + literal: 'yz', + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -1552,16 +1552,16 @@ describe('Components.Markdown.transform', () => { index: 1, children: [{ type: 'paragraph', - children: [] - }] - }] + children: [], + }], + }], }, { type: 'image', destination: 'http://example.com/abc', children: [{ type: 'text', - literal: 'abc' - }] + literal: 'abc', + }], }, { type: 'list', listType: 'bulleted', @@ -1580,18 +1580,18 @@ describe('Components.Markdown.transform', () => { index: 1, children: [{ type: 'paragraph', - children: [] - }] - }] - }] - }] + children: [], + }], + }], + }], + }], }, { type: 'image', destination: 'http://example.com/def', children: [{ type: 'text', - literal: 'def' - }] + literal: 'def', + }], }, { type: 'list', listType: 'bulleted', @@ -1611,18 +1611,18 @@ describe('Components.Markdown.transform', () => { index: 2, children: [{ type: 'paragraph', - children: [] - }] - }] - }] - }] + children: [], + }], + }], + }], + }], }, { type: 'image', destination: 'http://example.com/ghi', children: [{ type: 'text', - literal: 'ghi' - }] + literal: 'ghi', + }], }, { type: 'list', listType: 'ordered', @@ -1632,29 +1632,29 @@ describe('Components.Markdown.transform', () => { index: 3, children: [{ type: 'paragraph', - children: [] - }] - }] + children: [], + }], + }], }, { type: 'image', destination: 'http://example.com/jkl', children: [{ type: 'text', - literal: 'jkl' - }] + literal: 'jkl', + }], }, { type: 'block_quote', children: [{ type: 'paragraph', - children: [] - }] + children: [], + }], }, { type: 'image', destination: 'http://example.com/mno', children: [{ type: 'text', - literal: 'mno' - }] + literal: 'mno', + }], }, { type: 'block_quote', continue: true, @@ -1662,51 +1662,51 @@ describe('Components.Markdown.transform', () => { type: 'paragraph', continue: true, children: [{ - type: 'softbreak' - }] - }] + type: 'softbreak', + }], + }], }, { type: 'image', destination: 'http://example.com/pqr', children: [{ type: 'text', - literal: 'pqr' - }] + literal: 'pqr', + }], }, { - type: 'thematic_break' + type: 'thematic_break', }, { type: 'heading', level: 1, - children: [] + children: [], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'vw' - }] + literal: 'vw', + }], }, { type: 'heading', level: 1, - continue: true + continue: true, }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'x' - }] + literal: 'x', + }], }, { type: 'paragraph', - children: [] + children: [], }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'yz' - }] - }] + literal: 'yz', + }], + }], }); const actual = pullOutImages(input); @@ -1728,11 +1728,11 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] - }] - }] - }] + literal: 'an image', + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -1741,17 +1741,17 @@ describe('Components.Markdown.transform', () => { children: [{ type: 'link', destination: 'http://example.com', - children: [] - }] + children: [], + }], }, { type: 'image', destination: 'http://example.com/image', linkDestination: 'http://example.com', children: [{ type: 'text', - literal: 'an image' - }] - }] + literal: 'an image', + }], + }], }); const actual = pullOutImages(input); @@ -1770,20 +1770,20 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com', children: [{ type: 'text', - literal: 'This is ' + literal: 'This is ', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'text', - literal: ' in a sentence.' - }] - }] - }] + literal: ' in a sentence.', + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -1794,17 +1794,17 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com', children: [{ type: 'text', - literal: 'This is ' - }] - }] + literal: 'This is ', + }], + }], }, { type: 'image', destination: 'http://example.com/image', linkDestination: 'http://example.com', children: [{ type: 'text', - literal: 'an image' - }] + literal: 'an image', + }], }, { type: 'paragraph', continue: true, @@ -1814,10 +1814,10 @@ describe('Components.Markdown.transform', () => { continue: true, children: [{ type: 'text', - literal: 'in a sentence.' - }] - }] - }] + literal: 'in a sentence.', + }], + }], + }], }); const actual = pullOutImages(input); @@ -1842,27 +1842,27 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'image1' - }] - }] + literal: 'image1', + }], + }], }, { type: 'table_cell', isHeading: true, children: [{ type: 'text', - literal: 'This is ' + literal: 'This is ', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'image1' - }] + literal: 'image1', + }], }, { type: 'text', - literal: ' in a sentence.' - }] - }] + literal: ' in a sentence.', + }], + }], }, { type: 'table_row', isHeading: true, @@ -1871,18 +1871,18 @@ describe('Components.Markdown.transform', () => { isHeading: true, children: [{ type: 'text', - literal: 'This is ' + literal: 'This is ', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'image1' - }] + literal: 'image1', + }], }, { type: 'text', - literal: ' in a sentence.' - }] + literal: ' in a sentence.', + }], }, { type: 'table_cell', isHeading: true, @@ -1891,12 +1891,12 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'image1' - }] - }] - }] - }] - }] + literal: 'image1', + }], + }], + }], + }], + }], }); const expected = makeAst({ type: 'document', @@ -1913,27 +1913,27 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'image1' - }] - }] + literal: 'image1', + }], + }], }, { type: 'table_cell', isHeading: true, children: [{ type: 'text', - literal: 'This is ' + literal: 'This is ', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'image1' - }] + literal: 'image1', + }], }, { type: 'text', - literal: ' in a sentence.' - }] - }] + literal: ' in a sentence.', + }], + }], }, { type: 'table_row', isHeading: true, @@ -1942,18 +1942,18 @@ describe('Components.Markdown.transform', () => { isHeading: true, children: [{ type: 'text', - literal: 'This is ' + literal: 'This is ', }, { type: 'image', destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'image1' - }] + literal: 'image1', + }], }, { type: 'text', - literal: ' in a sentence.' - }] + literal: ' in a sentence.', + }], }, { type: 'table_cell', isHeading: true, @@ -1962,12 +1962,12 @@ describe('Components.Markdown.transform', () => { destination: 'http://example.com/image', children: [{ type: 'text', - literal: 'image1' - }] - }] - }] - }] - }] + literal: 'image1', + }], + }], + }], + }], + }], }); const actual = pullOutImages(input); diff --git a/test/app/selectors/post_list.test.js b/test/app/selectors/post_list.test.js index e7e58408a..23ac64094 100644 --- a/test/app/selectors/post_list.test.js +++ b/test/app/selectors/post_list.test.js @@ -6,7 +6,7 @@ import assert from 'assert'; import { DATE_LINE, makePreparePostIdsForPostList, - START_OF_NEW_MESSAGES + START_OF_NEW_MESSAGES, } from 'app/selectors/post_list'; import {Posts, Preferences} from 'mattermost-redux/constants'; @@ -22,19 +22,19 @@ describe('Selectors.PostList', () => { posts: { posts: { 1001: {id: '1001', create_at: 0}, - 1002: {id: '1002', create_at: 1, type: Posts.POST_TYPES.JOIN_CHANNEL} - } + 1002: {id: '1002', create_at: 1, type: Posts.POST_TYPES.JOIN_CHANNEL}, + }, }, preferences: { - myPreferences: {} + myPreferences: {}, }, users: { currentUserId: '1234', profiles: { - 1234: {id: '1234', username: 'user'} - } - } - } + 1234: {id: '1234', username: 'user'}, + }, + }, + }, }; const lastViewedAt = Number.POSITIVE_INFINITY; const postIds = ['1002', '1001']; @@ -56,11 +56,11 @@ describe('Selectors.PostList', () => { [getPreferenceKey(Preferences.CATEGORY_ADVANCED_SETTINGS, Preferences.ADVANCED_FILTER_JOIN_LEAVE)]: { category: Preferences.CATEGORY_ADVANCED_SETTINGS, name: Preferences.ADVANCED_FILTER_JOIN_LEAVE, - value: 'true' - } - } - } - } + value: 'true', + }, + }, + }, + }, }; now = preparePostIdsForPostList(state, {postIds, lastViewedAt, indicateNewMessages}); @@ -78,11 +78,11 @@ describe('Selectors.PostList', () => { [getPreferenceKey(Preferences.CATEGORY_ADVANCED_SETTINGS, Preferences.ADVANCED_FILTER_JOIN_LEAVE)]: { category: Preferences.CATEGORY_ADVANCED_SETTINGS, name: Preferences.ADVANCED_FILTER_JOIN_LEAVE, - value: 'false' - } - } - } - } + value: 'false', + }, + }, + }, + }, }; now = preparePostIdsForPostList(state, {postIds, lastViewedAt, indicateNewMessages}); @@ -97,10 +97,10 @@ describe('Selectors.PostList', () => { ...state.entities.posts, posts: { ...state.entities.posts.posts, - 1002: {id: '1002', create_at: 1, type: Posts.POST_TYPES.JOIN_CHANNEL, props: {username: 'user'}} - } - } - } + 1002: {id: '1002', create_at: 1, type: Posts.POST_TYPES.JOIN_CHANNEL, props: {username: 'user'}}, + }, + }, + }, }; now = preparePostIdsForPostList(state, {postIds, lastViewedAt, indicateNewMessages}); @@ -117,19 +117,19 @@ describe('Selectors.PostList', () => { posts: { 1000: {id: '1000', create_at: 1000}, 1005: {id: '1005', create_at: 1005}, - 1010: {id: '1010', create_at: 1010} - } + 1010: {id: '1010', create_at: 1010}, + }, }, preferences: { - myPreferences: {} + myPreferences: {}, }, users: { currentUserId: '1234', profiles: { - 1234: {id: '1234', username: 'user'} - } - } - } + 1234: {id: '1234', username: 'user'}, + }, + }, + }, }; const postIds = ['1010', '1005', '1000']; // Remember that we list the posts backwards @@ -157,29 +157,29 @@ describe('Selectors.PostList', () => { 1003: {id: '1003', create_at: (1 * 60 * 60 * 1000) + 10}, 1004: {id: '1004', create_at: 25 * 60 * 60 * 1000}, 1005: {id: '1005', create_at: (25 * 60 * 60 * 1000) + 5}, - 1006: {id: '1006', create_at: (25 * 60 * 60 * 1000) + 10, type: Posts.POST_TYPES.JOIN_CHANNEL} + 1006: {id: '1006', create_at: (25 * 60 * 60 * 1000) + 10, type: Posts.POST_TYPES.JOIN_CHANNEL}, }; let state = { entities: { posts: { - posts: initialPosts + posts: initialPosts, }, preferences: { myPreferences: { [getPreferenceKey(Preferences.CATEGORY_ADVANCED_SETTINGS, Preferences.ADVANCED_FILTER_JOIN_LEAVE)]: { category: Preferences.CATEGORY_ADVANCED_SETTINGS, name: Preferences.ADVANCED_FILTER_JOIN_LEAVE, - value: 'true' - } - } + value: 'true', + }, + }, }, users: { currentUserId: '1234', profiles: { - 1234: {id: '1234', username: 'user'} - } - } - } + 1234: {id: '1234', username: 'user'}, + }, + }, + }, }; let postIds = ['1006', '1004', '1003', '1001']; @@ -232,10 +232,10 @@ describe('Selectors.PostList', () => { ...state.entities.posts, posts: { ...state.entities.posts.posts, - 1007: {id: '1007', create_at: 7 * 60 * 60 * 7 * 1000} - } - } - } + 1007: {id: '1007', create_at: 7 * 60 * 60 * 7 * 1000}, + }, + }, + }, }; prev = now; @@ -252,10 +252,10 @@ describe('Selectors.PostList', () => { ...state.entities.posts, posts: { ...state.entities.posts.posts, - 1006: {...state.entities.posts.posts['1006'], message: 'abcd'} - } - } - } + 1006: {...state.entities.posts.posts['1006'], message: 'abcd'}, + }, + }, + }, }; prev = now; @@ -275,11 +275,11 @@ describe('Selectors.PostList', () => { [getPreferenceKey(Preferences.CATEGORY_ADVANCED_SETTINGS, Preferences.ADVANCED_FILTER_JOIN_LEAVE)]: { category: Preferences.CATEGORY_ADVANCED_SETTINGS, name: Preferences.ADVANCED_FILTER_JOIN_LEAVE, - value: 'false' - } - } - } - } + value: 'false', + }, + }, + }, + }, }; prev = now; diff --git a/test/mocks.js b/test/mocks.js index cc1aef723..306021231 100644 --- a/test/mocks.js +++ b/test/mocks.js @@ -3,7 +3,7 @@ import {addMock} from 'mocha-react-native'; addMock('react-native-device-info', { getBuildNumber: () => true, getVersion: () => true, - getDeviceLocale: () => 'en' + getDeviceLocale: () => 'en', }); addMock('react-native-linear-gradient', {}); addMock('UIManager', {}); diff --git a/test/test_helper.js b/test/test_helper.js index 436d46496..ce8884630 100644 --- a/test/test_helper.js +++ b/test/test_helper.js @@ -61,7 +61,7 @@ class TestHelper { email: this.fakeEmail(), allow_marketing: true, password: PASSWORD, - username: this.generateId() + username: this.generateId(), }; }; @@ -78,7 +78,7 @@ class TestHelper { type: 'O', email: this.fakeEmail(), allowed_domains: '', - invite_id: inviteId + invite_id: inviteId, }; }; @@ -89,7 +89,7 @@ class TestHelper { name, team_id: teamId, display_name: `Unit Test ${name}`, - type: 'O' + type: 'O', }; }; @@ -98,14 +98,14 @@ class TestHelper { user_id: userId, channel_id: channelId, notify_props: {}, - roles: 'system_user' + roles: 'system_user', }; }; fakePost = (channelId) => { return { channel_id: channelId, - message: `Unit Test ${this.generateId()}` + message: `Unit Test ${this.generateId()}`, }; }; @@ -126,7 +126,7 @@ class TestHelper { user: this.basicUser, team: this.basicTeam, channel: this.basicChannel, - post: this.basicPost + post: this.basicPost, }; };