Skip to content

Commit

Permalink
chore: Merge 4.46.1 into master (#5541)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello committed Feb 5, 2024
1 parent 6965551 commit e742288
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 13 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode VERSIONCODE as Integer
versionName "4.46.0"
versionName "4.46.1"
vectorDrawables.useSupportLibrary = true
if (!isFoss) {
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
Expand Down
37 changes: 35 additions & 2 deletions app/containers/SupportedVersions/SupportedVersionsExpired.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,49 @@
import React from 'react';
import React, { useState } from 'react';
import { View, Text, Linking } from 'react-native';
import { useDispatch } from 'react-redux';

import I18n from '../../i18n';
import { useAppSelector } from '../../lib/hooks';
import { getServerById } from '../../lib/database/services/Server';
import log from '../../lib/methods/helpers/log';
import database from '../../lib/database';
import { useTheme } from '../../theme';
import { CustomIcon } from '../CustomIcon';
import Button from '../Button';
import { styles } from './styles';
import { LEARN_MORE_URL } from './constants';
import { selectServerRequest } from '../../actions/server';

const checkAgainTimeout = 3000;

export const SupportedVersionsExpired = () => {
const { colors } = useTheme();
const { name } = useAppSelector(state => state.server);
const [checking, setChecking] = useState(false);
const { name, server } = useAppSelector(state => state.server);
const dispatch = useDispatch();

const checkAgain = async () => {
try {
setChecking(true);
const serversDB = database.servers;
const serverRecord = await getServerById(server);
if (serverRecord) {
await serversDB.write(async () => {
await serverRecord.update(r => {
r.supportedVersionsUpdatedAt = null;
r.supportedVersionsWarningAt = null;
});
});
dispatch(selectServerRequest(server));
// forces loading state a little longer until redux is finished
await new Promise(res => setTimeout(res, checkAgainTimeout));
}
} catch (e) {
log(e);
} finally {
setChecking(false);
}
};

return (
<View style={[styles.container, { paddingTop: 120, backgroundColor: colors.focusedBackground }]}>
Expand All @@ -22,6 +54,7 @@ export const SupportedVersionsExpired = () => {
{I18n.t('Supported_versions_expired_title', { workspace_name: name })}
</Text>
<Text style={[styles.description, { color: colors.bodyText }]}>{I18n.t('Supported_versions_expired_description')}</Text>
<Button title={I18n.t('Check_again')} type='primary' onPress={checkAgain} loading={checking} />
<Button
title={I18n.t('Learn_more')}
type='secondary'
Expand Down
4 changes: 2 additions & 2 deletions app/definitions/IServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export interface IServer {
enterpriseModules: IEnterpriseModules;
E2E_Enable: boolean;
supportedVersions?: ISupportedVersionsData;
supportedVersionsWarningAt?: Date;
supportedVersionsUpdatedAt?: Date;
supportedVersionsWarningAt?: Date | null;
supportedVersionsUpdatedAt?: Date | null;
}

export type TServerModel = IServer & Model;
15 changes: 14 additions & 1 deletion app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,5 +767,18 @@
"Why_do_you_want_to_report": "Why do you want to report?",
"You_dont_have_permission_to_perform_this_action": "You don’t have permission to perform this action. Check with a workspace administrator.",
"Jump_to_message": "Jump to message",
"Missed_call": "Missed call"
"Missed_call": "Missed call",
"In_app_message_notifications": "In app message notifications",
"Vibrate": "Vibrate",
"Recording_audio_in_progress": "Recording audio message",
"Bold": "Bold",
"Italic": "Italic",
"Strikethrough": "Strikethrough",
"Inline_code": "Inline code",
"Code_block": "Code block",
"Add_thread_reply": "Add thread reply",
"Message_roomname": "Message {{roomName}}",
"Microphone_access_needed_to_record_audio": "Microphone access needed to record audio",
"Go_to_your_device_settings_and_allow_microphone": "Go to your device settings and allow microphone access for Rocket.Chat",
"Check_again": "Check again"
}
7 changes: 6 additions & 1 deletion app/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,5 +767,10 @@
"Pinned_a_message": "Fixou uma mensagem:",
"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.",
"Jump_to_message": "Ir para mensagem",
"Missed_call": "Chamada perdida"
"Missed_call": "Chamada perdida",
"Microphone_access_needed_to_record_audio": "Acesso ao microfone necessário para gravar áudio",
"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",
"In_app_message_notifications": "Notificações de mensagens in-app",
"Vibrate": "Vibrar",
"Check_again": "Verificar novamente"
}
6 changes: 5 additions & 1 deletion app/sagas/selectServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
setSettings
} from '../lib/methods';
import { Services } from '../lib/services';
import { connect } from '../lib/services/connect';
import { connect, disconnect } from '../lib/services/connect';
import { appSelector } from '../lib/hooks';
import { getServerById } from '../lib/database/services/Server';
import { getLoggedUserById } from '../lib/database/services/LoggedUser';
Expand Down Expand Up @@ -129,6 +129,10 @@ const getServerInfoSaga = function* getServerInfoSaga({ server, raiseError = tru
});
yield put(setSupportedVersions(supportedVersionsResult));

if (supportedVersionsResult.status === 'expired') {
disconnect();
}

return serverRecord;
} catch (e) {
log(e);
Expand Down
4 changes: 2 additions & 2 deletions ios/RocketChatRN.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@
INFOPLIST_FILE = NotificationService/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.46.0;
MARKETING_VERSION = 4.46.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
Expand Down Expand Up @@ -1805,7 +1805,7 @@
INFOPLIST_FILE = NotificationService/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 4.46.0;
MARKETING_VERSION = 4.46.1;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative.NotificationService;
Expand Down
2 changes: 1 addition & 1 deletion ios/RocketChatRN/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.46.0</string>
<string>4.46.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ShareRocketChatRN/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>4.46.0</string>
<string>4.46.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>KeychainGroup</key>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rocket-chat-reactnative",
"version": "4.46.0",
"version": "4.46.1",
"private": true,
"scripts": {
"start": "react-native start",
Expand Down

0 comments on commit e742288

Please sign in to comment.