From 3baa2e62a8b8fc6712a33e6cb889754fad8eef52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Tue, 19 Sep 2023 13:33:28 +0800 Subject: [PATCH 1/2] Prevent nested timezone setting --- src/libs/Navigation/AppNavigator/AuthScreens.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index e0197805f09c..b446bad03c4a 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -69,8 +69,10 @@ Onyx.connect({ // If the current timezone is different than the user's timezone, and their timezone is set to automatic // then update their timezone. if (_.isObject(timezone) && timezone.automatic && timezone.selected !== currentTimezone) { - timezone.selected = currentTimezone; - PersonalDetails.updateAutomaticTimezone(timezone); + PersonalDetails.updateAutomaticTimezone({ + automatic: true, + selected: currentTimezone + }); } }, }); From b424d0abb46b42a6f9e57d4718d47fe20147b79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucien=20Akchot=C3=A9?= Date: Tue, 19 Sep 2023 14:27:34 +0800 Subject: [PATCH 2/2] fix prettier --- src/libs/Navigation/AppNavigator/AuthScreens.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index b446bad03c4a..50d27094e32b 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -71,7 +71,7 @@ Onyx.connect({ if (_.isObject(timezone) && timezone.automatic && timezone.selected !== currentTimezone) { PersonalDetails.updateAutomaticTimezone({ automatic: true, - selected: currentTimezone + selected: currentTimezone, }); } },