Skip to content

Commit 24f617f

Browse files
Merge branch 'develop' into develop
2 parents 980819d + 294fbb2 commit 24f617f

File tree

9 files changed

+150
-130
lines changed

9 files changed

+150
-130
lines changed

app/containers/TwoFactor/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default StyleSheet.create({
66
container: {
77
flex: 1,
88
justifyContent: 'center',
9+
alignItems: 'center',
910
padding: 16
1011
},
1112
content: {

app/i18n/locales/hi-IN.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
"Enter_manually": "मैन्युअल रूप से दर्ज करें",
293293
"Error_Download_file": "फ़ाइल डाउनलोड करते समय त्रुटि",
294294
"Error_incorrect_password": "गलत पासवर्ड",
295-
"Error_prefix": "त्रुटि: {{संदेश}}",
295+
"Error_prefix": "त्रुटि: {{message}}",
296296
"Error_uploading": "अपलोड करने में त्रुटि",
297297
"error-action-not-allowed": "{{action}} की अनुमति नहीं है",
298298
"error-avatar-invalid-url": "अवैध अवतार URL: {{url}}",
@@ -595,7 +595,7 @@
595595
"Pinned": "पिन किया गया",
596596
"Pinned_a_message": "एक संदेश को पिन किया गया है:",
597597
"Place_chat_on_hold": "चैट को होल्ड पर रखें",
598-
"Play": "खेल_PLAY",
598+
"Play": "चलाएँ",
599599
"Playback_speed": "प्लेबैक गति",
600600
"Please_add_a_comment": "कृपया एक टिप्पणी जोड़ें",
601601
"Please_enter_your_password": "कृपया अपना पासवर्ड डालें",

app/i18n/locales/ta-IN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"At_Least_1_Number": "குறைந்தது 1 எண்",
7373
"At_Least_1_Symbol": "குறைந்தது 1 சின்னம்",
7474
"At_Least_1_Uppercase_Letter": "குறைந்தது 1 பெரிய எழுத்து இருப்பதாக இருக்கும்",
75-
"At_Least_Characters": "کم از کم {{quantity}} حروف",
75+
"At_Least_Characters": "குறைந்தது {{quantity}} எழுத்துக்கள்",
7676
"At_Most_24_Characters": "அதிகபட்சம் 24 எழுத்துக்கள்",
7777
"At_Most_Characters": "அதிகபட்சம் {{quantity}} எழுத்துகள்",
7878
"Attention": "கவனம்",

app/i18n/locales/te-IN.json

Lines changed: 103 additions & 103 deletions
Large diffs are not rendered by default.

app/sagas/login.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { getUserPresence, subscribeUsersPresence } from '../lib/methods/getUsers
3232
import { logout, removeServerData, removeServerDatabase } from '../lib/methods/logout';
3333
import { subscribeSettings } from '../lib/methods/getSettings';
3434
import { connect, loginWithPassword, login } from '../lib/services/connect';
35-
import { saveUserProfile, registerPushToken, getUsersRoles } from '../lib/services/restApi';
35+
import { saveUserProfile, registerPushToken, getUsersRoles, setUserPresenceAway } from '../lib/services/restApi';
3636
import { setUsersRoles } from '../actions/usersRoles';
3737
import { getServerById } from '../lib/database/services/Server';
3838
import appNavigation from '../lib/navigation/appNavigation';
@@ -223,6 +223,23 @@ const fetchUsersRoles = function* fetchRoomsFork() {
223223
}
224224
};
225225

226+
const checkBackgroundAndSetAway = function* checkBackgroundAndSetAway() {
227+
try {
228+
const { background, root } = yield select(state => state.app);
229+
if (root !== RootEnum.ROOT_INSIDE || !background) {
230+
return;
231+
}
232+
const isAuthenticated = yield select(state => state.login.isAuthenticated);
233+
const isConnected = yield select(state => state.meteor.connected);
234+
if (!isAuthenticated || !isConnected) {
235+
return;
236+
}
237+
yield setUserPresenceAway();
238+
} catch (e) {
239+
log(e);
240+
}
241+
};
242+
226243
const handleLoginSuccess = function* handleLoginSuccess({ user }) {
227244
try {
228245
getUserPresence(user.id);
@@ -239,6 +256,7 @@ const handleLoginSuccess = function* handleLoginSuccess({ user }) {
239256
yield fork(fetchEnterpriseModulesFork, { user });
240257
yield fork(subscribeSettingsFork);
241258
yield fork(fetchUsersRoles);
259+
yield fork(checkBackgroundAndSetAway);
242260

243261
setLanguage(user?.language);
244262

app/sagas/state.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { select, takeLatest } from 'redux-saga/effects';
22

3-
import Navigation from '../lib/navigation/appNavigation';
43
import log from '../lib/methods/helpers/log';
54
import { localAuthenticate, saveLastLocalAuthenticationSession } from '../lib/methods/helpers/localAuthentication';
65
import { APP_STATE } from '../actions/actionsTypes';
@@ -9,25 +8,24 @@ import { checkAndReopen } from '../lib/services/connect';
98
import { setUserPresenceOnline, setUserPresenceAway } from '../lib/services/restApi';
109
import { checkPendingNotification } from '../lib/notifications';
1110

11+
const isAuthAndConnected = function* isAuthAndConnected() {
12+
const login = yield select(state => state.login);
13+
const meteor = yield select(state => state.meteor);
14+
return login.isAuthenticated && meteor.connected;
15+
};
16+
1217
const appHasComeBackToForeground = function* appHasComeBackToForeground() {
1318
const appRoot = yield select(state => state.app.root);
14-
if (appRoot === RootEnum.ROOT_OUTSIDE) {
19+
if (appRoot !== RootEnum.ROOT_INSIDE) {
1520
return;
1621
}
17-
const login = yield select(state => state.login);
18-
const server = yield select(state => state.server);
19-
if (
20-
!login.isAuthenticated ||
21-
login.isFetching ||
22-
server.connecting ||
23-
server.loading ||
24-
server.changingServer ||
25-
!Navigation.navigationRef.current
26-
) {
22+
const isReady = yield isAuthAndConnected();
23+
if (!isReady) {
2724
return;
2825
}
2926
try {
30-
yield localAuthenticate(server.server);
27+
const server = yield select(state => state.server.server);
28+
yield localAuthenticate(server);
3129
checkAndReopen();
3230
// Check for pending notification when app comes to foreground (Android - notification tap while in background)
3331
checkPendingNotification().catch((e) => {
@@ -41,13 +39,16 @@ const appHasComeBackToForeground = function* appHasComeBackToForeground() {
4139

4240
const appHasComeBackToBackground = function* appHasComeBackToBackground() {
4341
const appRoot = yield select(state => state.app.root);
44-
if (appRoot === RootEnum.ROOT_OUTSIDE) {
42+
if (appRoot !== RootEnum.ROOT_INSIDE) {
43+
return;
44+
}
45+
const isReady = yield isAuthAndConnected();
46+
if (!isReady) {
4547
return;
4648
}
4749
try {
4850
const server = yield select(state => state.server.server);
4951
yield saveLastLocalAuthenticationSession(server);
50-
5152
yield setUserPresenceAway();
5253
} catch (e) {
5354
log(e);

ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,7 +2327,7 @@ PODS:
23272327
- ReactCommon/turbomodule/bridging
23282328
- ReactCommon/turbomodule/core
23292329
- Yoga
2330-
- RNImageCropPicker (0.50.1):
2330+
- RNImageCropPicker (0.51.0):
23312331
- DoubleConversion
23322332
- glog
23332333
- hermes-engine
@@ -2351,10 +2351,10 @@ PODS:
23512351
- ReactCodegen
23522352
- ReactCommon/turbomodule/bridging
23532353
- ReactCommon/turbomodule/core
2354-
- RNImageCropPicker/QBImagePickerController (= 0.50.1)
2354+
- RNImageCropPicker/QBImagePickerController (= 0.51.0)
23552355
- TOCropViewController (~> 2.7.4)
23562356
- Yoga
2357-
- RNImageCropPicker/QBImagePickerController (0.50.1):
2357+
- RNImageCropPicker/QBImagePickerController (0.51.0):
23582358
- DoubleConversion
23592359
- glog
23602360
- hermes-engine
@@ -3172,7 +3172,7 @@ SPEC CHECKSUMS:
31723172
RNFBCrashlytics: 8a49978bb953d3fc052813093fecd4b447bbabf8
31733173
RNFileViewer: f9424017fa643c115c1444e11292e84fb16ddd68
31743174
RNGestureHandler: 8ff2b1434b0ff8bab28c8242a656fb842990bbc8
3175-
RNImageCropPicker: b219389d3a300679b396e81d501e8c8169ffa3c0
3175+
RNImageCropPicker: c78ee80ea778f90cb850f4d26696fd9c1a7bcfbb
31763176
RNLocalize: ca86348d88b9a89da0e700af58d428ab3f343c4e
31773177
RNReanimated: f52ccd5ceea2bae48d7421eec89b3f0c10d7b642
31783178
RNScreens: b13e4c45f0406f33986a39c0d8da0324bff94435

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"react-native-easy-toast": "2.3.0",
9999
"react-native-file-viewer": "2.1.4",
100100
"react-native-gesture-handler": "2.24.0",
101-
"react-native-image-crop-picker": "RocketChat/react-native-image-crop-picker#5346870b0be10d300dc53924309dc6adc9946d50",
101+
"react-native-image-crop-picker": "RocketChat/react-native-image-crop-picker#f028aac24373d05166747ef6d9e59bb037fe3224",
102102
"react-native-katex": "git+https://github.com/RocketChat/react-native-katex.git",
103103
"react-native-keyboard-controller": "^1.17.1",
104104
"react-native-linear-gradient": "2.6.2",

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12698,9 +12698,9 @@ react-native-gesture-handler@2.24.0:
1269812698
hoist-non-react-statics "^3.3.0"
1269912699
invariant "^2.2.4"
1270012700

12701-
react-native-image-crop-picker@RocketChat/react-native-image-crop-picker#5346870b0be10d300dc53924309dc6adc9946d50:
12702-
version "0.50.1"
12703-
resolved "https://codeload.github.com/RocketChat/react-native-image-crop-picker/tar.gz/5346870b0be10d300dc53924309dc6adc9946d50"
12701+
react-native-image-crop-picker@RocketChat/react-native-image-crop-picker#f028aac24373d05166747ef6d9e59bb037fe3224:
12702+
version "0.51.0"
12703+
resolved "https://codeload.github.com/RocketChat/react-native-image-crop-picker/tar.gz/f028aac24373d05166747ef6d9e59bb037fe3224"
1270412704

1270512705
react-native-is-edge-to-edge@1.1.6:
1270612706
version "1.1.6"

0 commit comments

Comments
 (0)