Skip to content

Commit 5e9aa95

Browse files
authored
chore: Merge 4.46.1 into single-server (#5542)
2 parents 21b3b7a + 8a65388 commit 5e9aa95

File tree

10 files changed

+68
-13
lines changed

10 files changed

+68
-13
lines changed

android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ android {
147147
minSdkVersion rootProject.ext.minSdkVersion
148148
targetSdkVersion rootProject.ext.targetSdkVersion
149149
versionCode VERSIONCODE as Integer
150-
versionName "4.46.0"
150+
versionName "4.46.1"
151151
vectorDrawables.useSupportLibrary = true
152152
if (!isFoss) {
153153
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]

app/containers/SupportedVersions/SupportedVersionsExpired.tsx

+35-2
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,49 @@
1-
import React from 'react';
1+
import React, { useState } from 'react';
22
import { View, Text, Linking } from 'react-native';
3+
import { useDispatch } from 'react-redux';
34

45
import I18n from '../../i18n';
56
import { useAppSelector } from '../../lib/hooks';
7+
import { getServerById } from '../../lib/database/services/Server';
8+
import log from '../../lib/methods/helpers/log';
9+
import database from '../../lib/database';
610
import { useTheme } from '../../theme';
711
import { CustomIcon } from '../CustomIcon';
812
import Button from '../Button';
913
import { styles } from './styles';
1014
import { LEARN_MORE_URL } from './constants';
15+
import { selectServerRequest } from '../../actions/server';
16+
17+
const checkAgainTimeout = 3000;
1118

1219
export const SupportedVersionsExpired = () => {
1320
const { colors } = useTheme();
14-
const { name } = useAppSelector(state => state.server);
21+
const [checking, setChecking] = useState(false);
22+
const { name, server } = useAppSelector(state => state.server);
23+
const dispatch = useDispatch();
24+
25+
const checkAgain = async () => {
26+
try {
27+
setChecking(true);
28+
const serversDB = database.servers;
29+
const serverRecord = await getServerById(server);
30+
if (serverRecord) {
31+
await serversDB.write(async () => {
32+
await serverRecord.update(r => {
33+
r.supportedVersionsUpdatedAt = null;
34+
r.supportedVersionsWarningAt = null;
35+
});
36+
});
37+
dispatch(selectServerRequest(server));
38+
// forces loading state a little longer until redux is finished
39+
await new Promise(res => setTimeout(res, checkAgainTimeout));
40+
}
41+
} catch (e) {
42+
log(e);
43+
} finally {
44+
setChecking(false);
45+
}
46+
};
1547

1648
return (
1749
<View style={[styles.container, { paddingTop: 120, backgroundColor: colors.focusedBackground }]}>
@@ -22,6 +54,7 @@ export const SupportedVersionsExpired = () => {
2254
{I18n.t('Supported_versions_expired_title', { workspace_name: name })}
2355
</Text>
2456
<Text style={[styles.description, { color: colors.bodyText }]}>{I18n.t('Supported_versions_expired_description')}</Text>
57+
<Button title={I18n.t('Check_again')} type='primary' onPress={checkAgain} loading={checking} />
2558
<Button
2659
title={I18n.t('Learn_more')}
2760
type='secondary'

app/definitions/IServer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ export interface IServer {
8080
enterpriseModules: IEnterpriseModules;
8181
E2E_Enable: boolean;
8282
supportedVersions?: ISupportedVersionsData;
83-
supportedVersionsWarningAt?: Date;
84-
supportedVersionsUpdatedAt?: Date;
83+
supportedVersionsWarningAt?: Date | null;
84+
supportedVersionsUpdatedAt?: Date | null;
8585
}
8686

8787
export type TServerModel = IServer & Model;

app/i18n/locales/en.json

+14-1
Original file line numberDiff line numberDiff line change
@@ -767,5 +767,18 @@
767767
"Why_do_you_want_to_report": "Why do you want to report?",
768768
"You_dont_have_permission_to_perform_this_action": "You don’t have permission to perform this action. Check with a workspace administrator.",
769769
"Jump_to_message": "Jump to message",
770-
"Missed_call": "Missed call"
770+
"Missed_call": "Missed call",
771+
"In_app_message_notifications": "In app message notifications",
772+
"Vibrate": "Vibrate",
773+
"Recording_audio_in_progress": "Recording audio message",
774+
"Bold": "Bold",
775+
"Italic": "Italic",
776+
"Strikethrough": "Strikethrough",
777+
"Inline_code": "Inline code",
778+
"Code_block": "Code block",
779+
"Add_thread_reply": "Add thread reply",
780+
"Message_roomname": "Message {{roomName}}",
781+
"Microphone_access_needed_to_record_audio": "Microphone access needed to record audio",
782+
"Go_to_your_device_settings_and_allow_microphone": "Go to your device settings and allow microphone access for Rocket.Chat",
783+
"Check_again": "Check again"
771784
}

app/i18n/locales/pt-BR.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -767,5 +767,10 @@
767767
"Pinned_a_message": "Fixou uma mensagem:",
768768
"You_dont_have_permission_to_perform_this_action": "Você não tem permissão para realizar esta ação. Verifique com um administrador do espaço de trabalho.",
769769
"Jump_to_message": "Ir para mensagem",
770-
"Missed_call": "Chamada perdida"
770+
"Missed_call": "Chamada perdida",
771+
"Microphone_access_needed_to_record_audio": "Acesso ao microfone necessário para gravar áudio",
772+
"Go_to_your_device_settings_and_allow_microphone": "Vá para as configurações do seu dispositivo e permita o acesso ao microfone pelo aplicativo Rocket.Chat",
773+
"In_app_message_notifications": "Notificações de mensagens in-app",
774+
"Vibrate": "Vibrar",
775+
"Check_again": "Verificar novamente"
771776
}

app/sagas/selectServer.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
setSettings
4343
} from '../lib/methods';
4444
import { Services } from '../lib/services';
45-
import { connect } from '../lib/services/connect';
45+
import { connect, disconnect } from '../lib/services/connect';
4646
import { appSelector } from '../lib/hooks';
4747
import { getServerById } from '../lib/database/services/Server';
4848
import { getLoggedUserById } from '../lib/database/services/LoggedUser';
@@ -129,6 +129,10 @@ const getServerInfoSaga = function* getServerInfoSaga({ server, raiseError = tru
129129
});
130130
yield put(setSupportedVersions(supportedVersionsResult));
131131

132+
if (supportedVersionsResult.status === 'expired') {
133+
disconnect();
134+
}
135+
132136
return serverRecord;
133137
} catch (e) {
134138
log(e);

ios/RocketChatRN.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@
17541754
INFOPLIST_FILE = NotificationService/Info.plist;
17551755
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
17561756
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
1757-
MARKETING_VERSION = 4.46.0;
1757+
MARKETING_VERSION = 4.46.1;
17581758
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
17591759
MTL_FAST_MATH = YES;
17601760
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
@@ -1793,7 +1793,7 @@
17931793
INFOPLIST_FILE = NotificationService/Info.plist;
17941794
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
17951795
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
1796-
MARKETING_VERSION = 4.46.0;
1796+
MARKETING_VERSION = 4.46.1;
17971797
MTL_FAST_MATH = YES;
17981798
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
17991799
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService;

ios/RocketChatRN/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<key>CFBundlePackageType</key>
2727
<string>APPL</string>
2828
<key>CFBundleShortVersionString</key>
29-
<string>4.46.0</string>
29+
<string>4.46.1</string>
3030
<key>CFBundleSignature</key>
3131
<string>????</string>
3232
<key>CFBundleURLTypes</key>

ios/ShareRocketChatRN/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<key>CFBundlePackageType</key>
2727
<string>XPC!</string>
2828
<key>CFBundleShortVersionString</key>
29-
<string>4.46.0</string>
29+
<string>4.46.1</string>
3030
<key>CFBundleVersion</key>
3131
<string>1</string>
3232
<key>KeychainGroup</key>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rocket-chat-reactnative",
3-
"version": "4.46.0",
3+
"version": "4.46.1",
44
"private": true,
55
"scripts": {
66
"start": "react-native start",

0 commit comments

Comments
 (0)