From 94e1334ebbd89ca3e5cc3caa3dbddcfbb8623d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Espino=20Garc=C3=ADa?= Date: Wed, 15 Nov 2023 15:07:00 +0100 Subject: [PATCH] Maintenance fixes (#7665) --- .../post_list/more_messages/more_messages.tsx | 2 +- app/products/calls/hooks.ts | 12 ++++++------ .../auto_follow_threads/auto_follow_threads.tsx | 9 ++++----- .../options/ignore_mentions/ignore_mentions.tsx | 11 +++++------ assets/base/i18n/en.json | 1 + package-lock.json | 12 ++++++------ package.json | 2 +- 7 files changed, 24 insertions(+), 25 deletions(-) diff --git a/app/components/post_list/more_messages/more_messages.tsx b/app/components/post_list/more_messages/more_messages.tsx index bb33275b4..8b431a490 100644 --- a/app/components/post_list/more_messages/more_messages.tsx +++ b/app/components/post_list/more_messages/more_messages.tsx @@ -7,7 +7,7 @@ import Animated, {interpolate, useAnimatedStyle, useSharedValue, withSpring} fro import {useSafeAreaInsets} from 'react-native-safe-area-context'; import {resetMessageCount} from '@actions/local/channel'; -import {useCallsAdjustment} from '@app/products/calls/hooks'; +import {useCallsAdjustment} from '@calls/hooks'; import CompassIcon from '@components/compass_icon'; import FormattedText from '@components/formatted_text'; import TouchableWithFeedback from '@components/touchable_with_feedback'; diff --git a/app/products/calls/hooks.ts b/app/products/calls/hooks.ts index 28a4aaf4f..c319912a9 100644 --- a/app/products/calls/hooks.ts +++ b/app/products/calls/hooks.ts @@ -8,12 +8,6 @@ import {useIntl} from 'react-intl'; import {Alert, Platform} from 'react-native'; import Permissions from 'react-native-permissions'; -import { - CALL_ERROR_BAR_HEIGHT, - CALL_NOTIFICATION_BAR_HEIGHT, - CURRENT_CALL_BAR_HEIGHT, - JOIN_CALL_BAR_HEIGHT, -} from '@app/constants/view'; import {initializeVoiceTrack} from '@calls/actions/calls'; import { setMicPermissionsGranted, @@ -24,6 +18,12 @@ import { useIncomingCalls, } from '@calls/state'; import {errorAlert} from '@calls/utils'; +import { + CALL_ERROR_BAR_HEIGHT, + CALL_NOTIFICATION_BAR_HEIGHT, + CURRENT_CALL_BAR_HEIGHT, + JOIN_CALL_BAR_HEIGHT, +} from '@constants/view'; import {useServerUrl} from '@context/server'; import {useAppState} from '@hooks/device'; import NetworkManager from '@managers/network_manager'; diff --git a/app/screens/channel_info/options/auto_follow_threads/auto_follow_threads.tsx b/app/screens/channel_info/options/auto_follow_threads/auto_follow_threads.tsx index 5421b1ff7..9fe228750 100644 --- a/app/screens/channel_info/options/auto_follow_threads/auto_follow_threads.tsx +++ b/app/screens/channel_info/options/auto_follow_threads/auto_follow_threads.tsx @@ -2,7 +2,7 @@ // See LICENSE.txt for license information. import React, {useState} from 'react'; -import {useIntl} from 'react-intl'; +import {defineMessage, useIntl} from 'react-intl'; import {updateChannelNotifyProps} from '@actions/remote/channel'; import OptionItem from '@components/option_item'; @@ -11,7 +11,6 @@ import { CHANNEL_AUTO_FOLLOW_THREADS_TRUE, } from '@constants/channel'; import {useServerUrl} from '@context/server'; -import {t} from '@i18n'; import {alertErrorWithFallback} from '@utils/draft'; import {preventDoubleTap} from '@utils/tap'; @@ -36,10 +35,10 @@ const AutoFollowThreads = ({channelId, displayName, followedStatus}: Props) => { alertErrorWithFallback( intl, result.error, - { - id: t('channel_info.channel_auto_follow_threads_failed'), + defineMessage({ + id: 'channel_info.channel_auto_follow_threads_failed', defaultMessage: 'An error occurred trying to auto follow all threads in channel {displayName}', - }, + }), {displayName}, ); setAutoFollow((v) => !v); diff --git a/app/screens/channel_info/options/ignore_mentions/ignore_mentions.tsx b/app/screens/channel_info/options/ignore_mentions/ignore_mentions.tsx index a9f0aaa97..999eda54f 100644 --- a/app/screens/channel_info/options/ignore_mentions/ignore_mentions.tsx +++ b/app/screens/channel_info/options/ignore_mentions/ignore_mentions.tsx @@ -2,13 +2,12 @@ // See LICENSE.txt for license information. import React, {useState} from 'react'; -import {useIntl} from 'react-intl'; +import {defineMessage, useIntl} from 'react-intl'; import {updateChannelNotifyProps} from '@actions/remote/channel'; -import {t} from '@app/i18n'; -import {alertErrorWithFallback} from '@app/utils/draft'; import OptionItem from '@components/option_item'; import {useServerUrl} from '@context/server'; +import {alertErrorWithFallback} from '@utils/draft'; import {preventDoubleTap} from '@utils/tap'; type Props = { @@ -32,10 +31,10 @@ const IgnoreMentions = ({channelId, ignoring, displayName}: Props) => { alertErrorWithFallback( intl, result.error, - { - id: t('channel_info.channel_auto_follow_threads_failed'), + defineMessage({ + id: 'channel_info.channel_auto_follow_threads_failed', defaultMessage: 'An error occurred trying to auto follow all threads in channel {displayName}', - }, + }), {displayName}, ); setIgnored((v) => !v); diff --git a/assets/base/i18n/en.json b/assets/base/i18n/en.json index 9a184d37a..4aff99bae 100644 --- a/assets/base/i18n/en.json +++ b/assets/base/i18n/en.json @@ -113,6 +113,7 @@ "channel_info.archive_failed": "An error occurred trying to archive the channel {displayName}", "channel_info.archive_title": "Archive {term}", "channel_info.channel_auto_follow_threads": "Follow all threads in this channel", + "channel_info.channel_auto_follow_threads_failed": "An error occurred trying to auto follow all threads in channel {displayName}", "channel_info.channel_files": "Files", "channel_info.close": "Close", "channel_info.close_dm": "Close direct message", diff --git a/package-lock.json b/package-lock.json index dc6e5a2af..4fd0a6d6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -164,7 +164,7 @@ "jest-cli": "29.6.2", "jetifier": "2.0.0", "metro-react-native-babel-preset": "0.77.0", - "mmjstool": "github:mattermost/mattermost-utilities#e65ab00f22628cbdee736fd2e4f192f07225e82d", + "mmjstool": "github:mattermost/mattermost-utilities#83b1b311972b8f5e750aae4019457a40abb5aa44", "mock-async-storage": "2.2.0", "nock": "13.3.2", "patch-package": "8.0.0", @@ -17436,8 +17436,8 @@ }, "node_modules/mmjstool": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/mattermost/mattermost-utilities.git#e65ab00f22628cbdee736fd2e4f192f07225e82d", - "integrity": "sha512-tY5XH26LwPztivGSbUWWaxZCkp/cKWTrtWBUnG8L1J+QIcLua8hzyZBe+VGDGdoHUJn4PbGpawJlUyoiC3r9Lg==", + "resolved": "git+ssh://git@github.com/mattermost/mattermost-utilities.git#83b1b311972b8f5e750aae4019457a40abb5aa44", + "integrity": "sha512-SFAbT+eN1mvgSfRTe8k6IMKVWbhGItTJtxZ+Pt0mX+fe8pakB3MkIkWzHBHVnEDI9Ek9kmQFGF1aZwzKFHXyYQ==", "dev": true, "dependencies": { "estree-walk": "^2.2.0", @@ -35806,10 +35806,10 @@ } }, "mmjstool": { - "version": "git+ssh://git@github.com/mattermost/mattermost-utilities.git#e65ab00f22628cbdee736fd2e4f192f07225e82d", - "integrity": "sha512-tY5XH26LwPztivGSbUWWaxZCkp/cKWTrtWBUnG8L1J+QIcLua8hzyZBe+VGDGdoHUJn4PbGpawJlUyoiC3r9Lg==", + "version": "git+ssh://git@github.com/mattermost/mattermost-utilities.git#83b1b311972b8f5e750aae4019457a40abb5aa44", + "integrity": "sha512-SFAbT+eN1mvgSfRTe8k6IMKVWbhGItTJtxZ+Pt0mX+fe8pakB3MkIkWzHBHVnEDI9Ek9kmQFGF1aZwzKFHXyYQ==", "dev": true, - "from": "mmjstool@github:mattermost/mattermost-utilities#e65ab00f22628cbdee736fd2e4f192f07225e82d", + "from": "mmjstool@github:mattermost/mattermost-utilities#83b1b311972b8f5e750aae4019457a40abb5aa44", "requires": { "estree-walk": "^2.2.0", "filehound": "^1.17.5", diff --git a/package.json b/package.json index 2590a3e11..2a0c0b9ff 100644 --- a/package.json +++ b/package.json @@ -165,7 +165,7 @@ "jest-cli": "29.6.2", "jetifier": "2.0.0", "metro-react-native-babel-preset": "0.77.0", - "mmjstool": "github:mattermost/mattermost-utilities#e65ab00f22628cbdee736fd2e4f192f07225e82d", + "mmjstool": "github:mattermost/mattermost-utilities#83b1b311972b8f5e750aae4019457a40abb5aa44", "mock-async-storage": "2.2.0", "nock": "13.3.2", "patch-package": "8.0.0",