From 1fc9df8a043ba1d9495ef8151aed1d247ffcf672 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Thu, 29 Dec 2022 10:09:32 -0700 Subject: [PATCH 01/31] Re-revert https://github.com/Expensify/App/pull/13758 --- src/libs/actions/SignInRedirect.js | 41 +++++++++++++++++------------- tests/ui/UnreadIndicatorsTest.js | 2 +- tests/unit/NetworkTest.js | 2 +- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index e66e50cab26..0c7ba243465 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -6,20 +6,6 @@ import * as Localize from '../Localize'; import * as PersistedRequests from './PersistedRequests'; import NetworkConnection from '../NetworkConnection'; -let currentActiveClients; -Onyx.connect({ - key: ONYXKEYS.ACTIVE_CLIENTS, - callback: (val) => { - currentActiveClients = !val ? [] : val; - }, -}); - -let currentPreferredLocale; -Onyx.connect({ - key: ONYXKEYS.NVP_PREFERRED_LOCALE, - callback: val => currentPreferredLocale = val, -}); - let currentIsOffline; let currentShouldForceOffline; Onyx.connect({ @@ -37,10 +23,29 @@ Onyx.connect({ * @param {String} errorMessage */ function clearStorageAndRedirect(errorMessage) { - const activeClients = currentActiveClients; - const preferredLocale = currentPreferredLocale; - const isOffline = currentIsOffline; - const shouldForceOffline = currentShouldForceOffline; + // Under certain conditions, there are key-values we'd like to keep in storage even when a user is logged out. + // We pass these into the clear() method in order to avoid having to reset them on a delayed tick and getting + // flashes of unwanted default state. + const keysToPreserve = []; + keysToPreserve.push(ONYXKEYS.NVP_PREFERRED_LOCALE); + keysToPreserve.push(ONYXKEYS.ACTIVE_CLIENTS); + + // After signing out, set ourselves as offline if we were offline before logging out and we are not forcing it. + // If we are forcing offline, ignore it while signed out, otherwise it would require a refresh because there's no way to toggle the switch to go back online while signed out. + if (currentIsOffline && !currentShouldForceOffline) { + keysToPreserve.push(ONYXKEYS.NETWORK); + } + + Onyx.clear(keysToPreserve) + .then(() => { + if (!errorMessage) { + return; + } + + // `Onyx.clear` reinitializes the Onyx instance with initial values so use `Onyx.merge` instead of `Onyx.set` + Onyx.merge(ONYXKEYS.SESSION, {errors: {[DateUtils.getMicroseconds()]: Localize.translateLocal(errorMessage)}}); + }); + // Clearing storage discards the authToken. This causes a redirect to the SignIn screen Onyx.clear() diff --git a/tests/ui/UnreadIndicatorsTest.js b/tests/ui/UnreadIndicatorsTest.js index cb777bcd61e..9883c1bf04f 100644 --- a/tests/ui/UnreadIndicatorsTest.js +++ b/tests/ui/UnreadIndicatorsTest.js @@ -184,7 +184,7 @@ function signInAndGetAppWithUnreadChat() { } describe('Unread Indicators', () => { - afterEach(Onyx.clear); + afterEach(() => Onyx.clear()); it('Display bold in the LHN for unread chat and new line indicator above the chat message when we navigate to it', () => { let renderedApp; diff --git a/tests/unit/NetworkTest.js b/tests/unit/NetworkTest.js index 1586e1a10c7..0a02132af77 100644 --- a/tests/unit/NetworkTest.js +++ b/tests/unit/NetworkTest.js @@ -36,7 +36,7 @@ beforeEach(() => { // Wait for any Log command to finish and Onyx to fully clear jest.advanceTimersByTime(CONST.NETWORK.PROCESS_REQUEST_DELAY_MS); return waitForPromisesToResolve() - .then(Onyx.clear) + .then(() => Onyx.clear()) .then(waitForPromisesToResolve); }); From d8b3f7929684b024e3140545be964f657eeec80a Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Mon, 2 Jan 2023 14:48:38 -0800 Subject: [PATCH 02/31] Remove bad merge conflict --- src/libs/actions/SignInRedirect.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index 0c7ba243465..c7b1079c04f 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -45,29 +45,6 @@ function clearStorageAndRedirect(errorMessage) { // `Onyx.clear` reinitializes the Onyx instance with initial values so use `Onyx.merge` instead of `Onyx.set` Onyx.merge(ONYXKEYS.SESSION, {errors: {[DateUtils.getMicroseconds()]: Localize.translateLocal(errorMessage)}}); }); - - - // Clearing storage discards the authToken. This causes a redirect to the SignIn screen - Onyx.clear() - .then(() => { - if (preferredLocale) { - Onyx.set(ONYXKEYS.NVP_PREFERRED_LOCALE, preferredLocale); - } - if (activeClients && activeClients.length > 0) { - Onyx.set(ONYXKEYS.ACTIVE_CLIENTS, activeClients); - } - - // After signing out, set ourselves as offline if we were offline before logging out and we are not forcing it. - // If we are forcing offline, ignore it while signed out, otherwise it would require a refresh because there's no way to toggle the switch to go back online while signed out. - if (isOffline && !shouldForceOffline) { - Onyx.set(ONYXKEYS.NETWORK, {isOffline}); - } - - // `Onyx.clear` reinitialize the Onyx instance with initial values so use `Onyx.merge` instead of `Onyx.set` - if (errorMessage) { - Onyx.merge(ONYXKEYS.SESSION, {errors: {[DateUtils.getMicroseconds()]: Localize.translateLocal(errorMessage)}}); - } - }); } /** From e58cad2eac2d13fa3f9167e61a3d779b2dbbec04 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Mon, 2 Jan 2023 16:16:50 -0800 Subject: [PATCH 03/31] Add some timing of Onyx.clear --- src/libs/actions/SignInRedirect.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index c7b1079c04f..7ff0a85808b 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -5,6 +5,7 @@ import DateUtils from '../DateUtils'; import * as Localize from '../Localize'; import * as PersistedRequests from './PersistedRequests'; import NetworkConnection from '../NetworkConnection'; +import Timing from './Timing'; let currentIsOffline; let currentShouldForceOffline; @@ -36,8 +37,10 @@ function clearStorageAndRedirect(errorMessage) { keysToPreserve.push(ONYXKEYS.NETWORK); } + Timing.start('clear'); Onyx.clear(keysToPreserve) .then(() => { + Timing.end('clear'); if (!errorMessage) { return; } From 6def1b37c89cdf3fd93e52cc4b68ae0984eae324 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Tue, 3 Jan 2023 15:08:41 -0800 Subject: [PATCH 04/31] Don't sign out until Onyx.clear() is finished --- src/libs/actions/Session/index.js | 14 +------------- src/libs/actions/SignInRedirect.js | 2 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/libs/actions/Session/index.js b/src/libs/actions/Session/index.js index b564efd5e7b..655d1e29555 100644 --- a/src/libs/actions/Session/index.js +++ b/src/libs/actions/Session/index.js @@ -29,18 +29,6 @@ Onyx.connect({ function signOut() { Log.info('Flushing logs before signing out', true, {}, true); - const optimisticData = [ - { - onyxMethod: CONST.ONYX.METHOD.SET, - key: ONYXKEYS.SESSION, - value: null, - }, - { - onyxMethod: CONST.ONYX.METHOD.SET, - key: ONYXKEYS.CREDENTIALS, - value: {}, - }, - ]; API.write('LogOut', { // Send current authToken because we will immediately clear it once triggering this command authToken: NetworkStore.getAuthToken(), @@ -48,7 +36,7 @@ function signOut() { partnerName: CONFIG.EXPENSIFY.PARTNER_NAME, partnerPassword: CONFIG.EXPENSIFY.PARTNER_PASSWORD, shouldRetry: false, - }, {optimisticData}); + }); Timing.clearData(); } diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index 7ff0a85808b..aaccbf35ef5 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -37,10 +37,8 @@ function clearStorageAndRedirect(errorMessage) { keysToPreserve.push(ONYXKEYS.NETWORK); } - Timing.start('clear'); Onyx.clear(keysToPreserve) .then(() => { - Timing.end('clear'); if (!errorMessage) { return; } From 635215be01c98a5675c7a9a3d05390a1d10e3ca6 Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Tue, 10 Jan 2023 16:34:41 -0500 Subject: [PATCH 05/31] scan for report action notifications --- src/libs/actions/Report.js | 1 + src/libs/actions/User.js | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 8842098c6fa..6c3aa731fac 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1190,4 +1190,5 @@ export { clearIOUError, getMaxSequenceNumber, subscribeToNewActionEvent, + showReportActionNotification, }; diff --git a/src/libs/actions/User.js b/src/libs/actions/User.js index 532e7bb04c6..784a23a5132 100644 --- a/src/libs/actions/User.js +++ b/src/libs/actions/User.js @@ -17,6 +17,7 @@ import * as Localize from '../Localize'; import * as Link from './Link'; import * as SequentialQueue from '../Network/SequentialQueue'; import PusherUtils from '../PusherUtils'; +import * as Report from './Report'; let currentUserAccountID = ''; Onyx.connect({ @@ -256,6 +257,22 @@ function deletePaypalMeAddress() { Growl.show(Localize.translateLocal('paymentsPage.deletePayPalSuccess'), CONST.GROWL.SUCCESS, 3000); } +function triggerNotifications(onyxUpdates) { + _.each(onyxUpdates, (update) => { + if (!update.shouldNotify) { + return; + } + + const reportID = update.key.replace(ONYXKEYS.COLLECTION.REPORT_ACTIONS, ''); + const reportAction = _.chain(update.value) + .values() + .compact() + .first() + .value(); + Report.showReportActionNotification(reportID, reportAction); + }); +} + /** * Initialize our pusher subscription to listen for user changes */ @@ -271,6 +288,7 @@ function subscribeToUserEvents() { PusherUtils.subscribeToPrivateUserChannelEvent(Pusher.TYPE.ONYX_API_UPDATE, currentUserAccountID, (pushJSON) => { SequentialQueue.getCurrentRequest().then(() => { Onyx.update(pushJSON); + triggerNotifications(pushJSON); }); }); From baced433f3108a10d120cc83d9ca153c1e9efdeb Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Tue, 10 Jan 2023 16:37:04 -0500 Subject: [PATCH 06/31] don't notify for deleted report actions --- src/libs/actions/Report.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 6c3aa731fac..18fa0b6d829 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1060,6 +1060,10 @@ function subscribeToNewActionEvent(reportID, callback) { * @param {Object} action */ function showReportActionNotification(reportID, action) { + if (ReportActionsUtils.isDeletedAction(action)) { + return; + } + if (!ActiveClientManager.isClientTheLeader()) { Log.info('[LOCAL_NOTIFICATION] Skipping notification because this client is not the leader'); return; @@ -1152,7 +1156,7 @@ Onyx.connect({ newActionSubscriber.callback(isFromCurrentUser, action.reportActionID); } - showReportActionNotification(reportID, action); + // showReportActionNotification(reportID, action); handledReportActions[reportID] = handledReportActions[reportID] || {}; handledReportActions[reportID][action.sequenceNumber] = true; }); From a775120da59d508bbc12f0fec2f148d549f521d4 Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Tue, 10 Jan 2023 16:38:28 -0500 Subject: [PATCH 07/31] notify ReportActionsView --- src/libs/actions/Report.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 18fa0b6d829..0d119ced1c3 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1107,6 +1107,12 @@ function showReportActionNotification(reportID, action) { Navigation.navigate(ROUTES.getReportRoute(reportID)); }, }); + + // Notify the ReportActionsView that a new comment has arrived + if (reportID === newActionSubscriber.reportID) { + const isFromCurrentUser = action.actorAccountID === currentUserAccountID; + newActionSubscriber.callback(isFromCurrentUser, action.reportActionID); + } } /** From f35382563a05816c7c0a1e29434cee19da0de7bc Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Tue, 10 Jan 2023 16:40:08 -0500 Subject: [PATCH 08/31] remove old report action handling --- src/libs/actions/Report.js | 46 -------------------------------------- 1 file changed, 46 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 0d119ced1c3..dbcc06fbb0d 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1,5 +1,4 @@ import {Linking} from 'react-native'; -import moment from 'moment'; import _ from 'underscore'; import lodashGet from 'lodash/get'; import ExpensiMark from 'expensify-common/lib/ExpensiMark'; @@ -1124,51 +1123,6 @@ function clearIOUError(reportID) { Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {errorFields: {iou: null}}); } -// We are using this map to ensure actions are only handled once -const handledReportActions = {}; -Onyx.connect({ - key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, - initWithStoredValues: false, - callback: (actions, key) => { - // reportID can be derived from the Onyx key - const reportID = key.split('_')[1]; - if (!reportID) { - return; - } - - _.each(actions, (action) => { - if (lodashGet(handledReportActions, [reportID, action.sequenceNumber])) { - return; - } - - if (ReportActionsUtils.isDeletedAction(action)) { - return; - } - - if (!action.created) { - return; - } - - // If we are past the deadline to notify for this comment don't do it - if (moment.utc(moment(action.created).unix() * 1000).isBefore(moment.utc().subtract(10, 'seconds'))) { - handledReportActions[reportID] = handledReportActions[reportID] || {}; - handledReportActions[reportID][action.sequenceNumber] = true; - return; - } - - // Notify the ReportActionsView that a new comment has arrived - if (reportID === newActionSubscriber.reportID) { - const isFromCurrentUser = action.actorAccountID === currentUserAccountID; - newActionSubscriber.callback(isFromCurrentUser, action.reportActionID); - } - - // showReportActionNotification(reportID, action); - handledReportActions[reportID] = handledReportActions[reportID] || {}; - handledReportActions[reportID][action.sequenceNumber] = true; - }); - }, -}); - export { addComment, addAttachment, From 9cfec573468114476968b588242fa8531f35e086 Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Wed, 11 Jan 2023 16:04:35 -0500 Subject: [PATCH 09/31] add a test for showing notifications for report action updates with shouldNotify --- tests/actions/ReportTest.js | 42 ++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/actions/ReportTest.js b/tests/actions/ReportTest.js index 0ab2f7f2f63..0918dda3ec4 100644 --- a/tests/actions/ReportTest.js +++ b/tests/actions/ReportTest.js @@ -3,7 +3,7 @@ import Onyx from 'react-native-onyx'; import lodashGet from 'lodash/get'; import moment from 'moment'; import { - beforeEach, beforeAll, afterEach, jest, describe, it, expect, + beforeEach, beforeAll, afterEach, describe, it, expect, } from '@jest/globals'; import ONYXKEYS from '../../src/ONYXKEYS'; import * as Pusher from '../../src/libs/Pusher/pusher'; @@ -19,6 +19,15 @@ import * as User from '../../src/libs/actions/User'; import * as ReportUtils from '../../src/libs/ReportUtils'; import DateUtils from '../../src/libs/DateUtils'; +jest.mock('../../src/libs/actions/Report', () => { + const originalModule = jest.requireActual('../../src/libs/actions/Report'); + + return { + ...originalModule, + showReportActionNotification: jest.fn(), + }; +}); + describe('actions/Report', () => { beforeAll(() => { // When using the Pusher mock the act of calling Pusher.isSubscribed will create a @@ -470,4 +479,35 @@ describe('actions/Report', () => { expectedOutput = 'Comment www.google.com [www.facebook.com](https://www.facebook.com)'; expect(newCommentMarkdown).toBe(expectedOutput); }); + + it('should show a notification for report action updates with shouldNotify', () => { + const TEST_USER_ACCOUNT_ID = 1; + const REPORT_ID = 1; + const REPORT_ACTION = {}; + + // Setup user and pusher listeners + return TestHelper.signInWithTestUser(TEST_USER_ACCOUNT_ID) + .then(() => { + User.subscribeToUserEvents(); + return waitForPromisesToResolve(); + }) + .then(() => { + // Simulate a Pusher Onyx update with a report action with shouldNotify + const channel = Pusher.getChannel(`${CONST.PUSHER.PRIVATE_USER_CHANNEL_PREFIX}${TEST_USER_ACCOUNT_ID}${CONFIG.PUSHER.SUFFIX}`); + channel.emit(Pusher.TYPE.ONYX_API_UPDATE, [ + { + onyxMethod: CONST.ONYX.METHOD.MERGE, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${REPORT_ID}`, + value: { + 1: REPORT_ACTION, + }, + shouldNotify: true, + }, + ]); + return waitForPromisesToResolve(); + }).then(() => { + // Ensure we show a notification for this new report action + expect(Report.showReportActionNotification).toBeCalledWith(String(REPORT_ID), REPORT_ACTION); + }); + }); }); From e7651685ba1f8b9e4ee54d023a3c917de5179b2b Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Thu, 12 Jan 2023 08:26:45 -0800 Subject: [PATCH 10/31] Update react-native-onyx version --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index e66eceaa28b..120867b5834 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,7 +68,7 @@ "react-native-image-picker": "^4.10.2", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.32", + "react-native-onyx": "1.0.34", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", "react-native-permissions": "^3.0.1", @@ -35507,9 +35507,9 @@ } }, "node_modules/react-native-onyx": { - "version": "1.0.32", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.32.tgz", - "integrity": "sha512-mhmCrxYfNlLM8bpP2M5g1u90115VqbJ1Lt2PjyrQsJihHRTdc7yqbiWwWlEQ1KyAYVR79JCSesKelgkdRAZIag==", + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.34.tgz", + "integrity": "sha512-k2iqx72KWr/Ggwao/FtJwHwopz2h9ByRc2dIIkUG3APba7+xMZC7JSUMJCoopoQXIht/k0eVL8kXsPXSZElKNg==", "dependencies": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", @@ -69938,9 +69938,9 @@ } }, "react-native-onyx": { - "version": "1.0.32", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.32.tgz", - "integrity": "sha512-mhmCrxYfNlLM8bpP2M5g1u90115VqbJ1Lt2PjyrQsJihHRTdc7yqbiWwWlEQ1KyAYVR79JCSesKelgkdRAZIag==", + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.34.tgz", + "integrity": "sha512-k2iqx72KWr/Ggwao/FtJwHwopz2h9ByRc2dIIkUG3APba7+xMZC7JSUMJCoopoQXIht/k0eVL8kXsPXSZElKNg==", "requires": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", diff --git a/package.json b/package.json index 6c5d2de74cb..e5e29ebf96c 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "react-native-image-picker": "^4.10.2", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.32", + "react-native-onyx": "1.0.34", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", "react-native-permissions": "^3.0.1", From fd02ce569ab23309bdcea47d1aaa3d1ec0e4c34b Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Thu, 12 Jan 2023 17:52:28 +0100 Subject: [PATCH 11/31] Exclude current workspace members on invite page taking into account pendingAction delete --- src/pages/workspace/WorkspaceInvitePage.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index b8b2812b23e..83b48696c16 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -108,7 +108,12 @@ class WorkspaceInvitePage extends React.Component { } getExcludedUsers() { - const policyMemberList = _.keys(lodashGet(this.props, 'policyMemberList', {})); + let policyMemberList = lodashGet(this.props, 'policyMemberList', {}); + policyMemberList = _.filter(_.keys(policyMemberList), policyMember => ( + this.props.network.isOffline + || policyMemberList[policyMember].pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE + || !_.isEmpty(policyMemberList[policyMember].errors) + )); return [...CONST.EXPENSIFY_EMAILS, ...policyMemberList]; } From 2600587389e8eaeb9705c12b3f66a9bc8d7ac12a Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Thu, 12 Jan 2023 16:12:36 -0800 Subject: [PATCH 12/31] Update react-native-onyx version --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 120867b5834..91b13502449 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,7 +68,7 @@ "react-native-image-picker": "^4.10.2", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.34", + "react-native-onyx": "1.0.35", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", "react-native-permissions": "^3.0.1", @@ -35507,9 +35507,9 @@ } }, "node_modules/react-native-onyx": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.34.tgz", - "integrity": "sha512-k2iqx72KWr/Ggwao/FtJwHwopz2h9ByRc2dIIkUG3APba7+xMZC7JSUMJCoopoQXIht/k0eVL8kXsPXSZElKNg==", + "version": "1.0.35", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.35.tgz", + "integrity": "sha512-HQDSM0c2ADb54NoSQdxqeJOhViICB9HwE8aMEB62AdHkRw6crCoIX7iSIF0ewbZ2A/hbX3frewWq8AUh3AyMvA==", "dependencies": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", @@ -69938,9 +69938,9 @@ } }, "react-native-onyx": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.34.tgz", - "integrity": "sha512-k2iqx72KWr/Ggwao/FtJwHwopz2h9ByRc2dIIkUG3APba7+xMZC7JSUMJCoopoQXIht/k0eVL8kXsPXSZElKNg==", + "version": "1.0.35", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.35.tgz", + "integrity": "sha512-HQDSM0c2ADb54NoSQdxqeJOhViICB9HwE8aMEB62AdHkRw6crCoIX7iSIF0ewbZ2A/hbX3frewWq8AUh3AyMvA==", "requires": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", diff --git a/package.json b/package.json index e5e29ebf96c..1a1fb94b5a1 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "react-native-image-picker": "^4.10.2", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.34", + "react-native-onyx": "1.0.35", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", "react-native-permissions": "^3.0.1", From d9e538231401d84306d95be75f6044e423e50210 Mon Sep 17 00:00:00 2001 From: Kosuke Tseng Date: Thu, 12 Jan 2023 17:18:16 -0800 Subject: [PATCH 13/31] add new logic --- src/components/AddPlaidBankAccount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 29d76102b4b..907e4958afb 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -119,7 +119,7 @@ class AddPlaidBankAccount extends React.Component { if (!plaidBankAccounts.length) { return ( - {(!token || this.props.plaidData.isLoading) + {this.props.plaidData.isLoading || (!token && !plaidDataErrorMessage) && ( From a37d11bfff26f96bf52e9dd8301c905f922e2782 Mon Sep 17 00:00:00 2001 From: Kosuke Tseng Date: Thu, 12 Jan 2023 17:53:59 -0800 Subject: [PATCH 14/31] fix loading logic --- src/components/AddPlaidBankAccount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 907e4958afb..832f4b57346 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -119,7 +119,7 @@ class AddPlaidBankAccount extends React.Component { if (!plaidBankAccounts.length) { return ( - {this.props.plaidData.isLoading || (!token && !plaidDataErrorMessage) + {(this.props.plaidData.isLoading || (!token && !plaidDataErrorMessage)) && ( From 9d76b8fd1453c26a321a86844d82ae4e47f304f7 Mon Sep 17 00:00:00 2001 From: Kosuke Tseng Date: Thu, 12 Jan 2023 17:56:28 -0800 Subject: [PATCH 15/31] clean up --- src/components/AddPlaidBankAccount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 832f4b57346..ceca9cba186 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -119,7 +119,7 @@ class AddPlaidBankAccount extends React.Component { if (!plaidBankAccounts.length) { return ( - {(this.props.plaidData.isLoading || (!token && !plaidDataErrorMessage)) + {(this.props.plaidData.isLoading || !token && !plaidDataErrorMessage) && ( From 3c6902c55b9d029e1491faa5c8376cc66d5c068f Mon Sep 17 00:00:00 2001 From: Kosuke Tseng Date: Thu, 12 Jan 2023 23:10:37 -0800 Subject: [PATCH 16/31] fix lint --- src/components/AddPlaidBankAccount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index ceca9cba186..832f4b57346 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -119,7 +119,7 @@ class AddPlaidBankAccount extends React.Component { if (!plaidBankAccounts.length) { return ( - {(this.props.plaidData.isLoading || !token && !plaidDataErrorMessage) + {(this.props.plaidData.isLoading || (!token && !plaidDataErrorMessage)) && ( From f6916b9616e0ed7c0c5d070cade519bd4e413e41 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Fri, 13 Jan 2023 13:19:35 -0700 Subject: [PATCH 17/31] Update src/libs/actions/SignInRedirect.js Co-authored-by: Luthfi --- src/libs/actions/SignInRedirect.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index aaccbf35ef5..c7b1079c04f 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -5,7 +5,6 @@ import DateUtils from '../DateUtils'; import * as Localize from '../Localize'; import * as PersistedRequests from './PersistedRequests'; import NetworkConnection from '../NetworkConnection'; -import Timing from './Timing'; let currentIsOffline; let currentShouldForceOffline; From c1034a9614853fb085a76001188e1b3c1bf9cfdd Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Fri, 13 Jan 2023 13:23:23 -0700 Subject: [PATCH 18/31] add disable state --- src/pages/workspace/WorkspaceInvitePage.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index b8b2812b23e..5388d8a41e4 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -87,6 +87,7 @@ class WorkspaceInvitePage extends React.Component { selectedOptions: [], userToInvite, welcomeNote: this.getWelcomeNote(), + shouldDisableButton: false, }; } @@ -250,10 +251,12 @@ class WorkspaceInvitePage extends React.Component { return; } - const logins = _.map(this.state.selectedOptions, option => option.login); - const filteredLogins = _.uniq(_.compact(_.map(logins, login => login.toLowerCase().trim()))); - Policy.addMembersToWorkspace(filteredLogins, this.state.welcomeNote || this.getWelcomeNote(), this.props.route.params.policyID); - Navigation.goBack(); + this.setState({shouldDisableButton: true}, () => { + const logins = _.map(this.state.selectedOptions, option => option.login); + const filteredLogins = _.uniq(_.compact(_.map(logins, login => login.toLowerCase().trim()))); + Policy.addMembersToWorkspace(filteredLogins, this.state.welcomeNote || this.getWelcomeNote(), this.props.route.params.policyID); + Navigation.goBack(); + }); } /** @@ -331,7 +334,7 @@ class WorkspaceInvitePage extends React.Component { /> Date: Fri, 13 Jan 2023 22:25:27 +0100 Subject: [PATCH 19/31] Update src/pages/workspace/WorkspaceInvitePage.js Co-authored-by: Sahil --- src/pages/workspace/WorkspaceInvitePage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 83b48696c16..8c3b81b22fd 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -108,13 +108,13 @@ class WorkspaceInvitePage extends React.Component { } getExcludedUsers() { - let policyMemberList = lodashGet(this.props, 'policyMemberList', {}); - policyMemberList = _.filter(_.keys(policyMemberList), policyMember => ( + const policyMemberList = lodashGet(this.props, 'policyMemberList', {}); + const usersToExclude = _.filter(_.keys(policyMemberList), policyMember => ( this.props.network.isOffline || policyMemberList[policyMember].pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || !_.isEmpty(policyMemberList[policyMember].errors) )); - return [...CONST.EXPENSIFY_EMAILS, ...policyMemberList]; + return [...CONST.EXPENSIFY_EMAILS, ...usersToExclude]; } /** From d4c9e5e07b2eff1ebbcc7f627df3f020ec4a76a3 Mon Sep 17 00:00:00 2001 From: Abdul Rahuman Date: Sat, 14 Jan 2023 03:28:10 +0530 Subject: [PATCH 20/31] adding shaded version for handshake emoji --- assets/emojis.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/emojis.js b/assets/emojis.js index 9a5a2f28968..6fe6ddf0f06 100644 --- a/assets/emojis.js +++ b/assets/emojis.js @@ -2259,6 +2259,13 @@ const emojis = [ 'meeting', 'shake', ], + types: [ + '🤝🏿', + '🤝🏾', + '🤝🏽', + '🤝🏼', + '🤝🏻', + ], }, { name: 'pray', From 85e25c8b7d8c47c9ae35903907a1d7c7cd7d0373 Mon Sep 17 00:00:00 2001 From: Kosuke Tseng Date: Fri, 13 Jan 2023 14:23:32 -0800 Subject: [PATCH 21/31] remove token --- src/components/AddPlaidBankAccount.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/AddPlaidBankAccount.js b/src/components/AddPlaidBankAccount.js index 832f4b57346..386eea4c325 100644 --- a/src/components/AddPlaidBankAccount.js +++ b/src/components/AddPlaidBankAccount.js @@ -119,8 +119,7 @@ class AddPlaidBankAccount extends React.Component { if (!plaidBankAccounts.length) { return ( - {(this.props.plaidData.isLoading || (!token && !plaidDataErrorMessage)) - && ( + {this.props.plaidData.isLoading && ( From b9149ade31eff7f4c0f9265485bbad41421799f6 Mon Sep 17 00:00:00 2001 From: Eugene Voloshchak Date: Sun, 15 Jan 2023 12:42:39 +0200 Subject: [PATCH 22/31] Remove iconFill property from get help icon --- src/pages/GetAssistancePage.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/GetAssistancePage.js b/src/pages/GetAssistancePage.js index fea935c176c..2f849c9a998 100644 --- a/src/pages/GetAssistancePage.js +++ b/src/pages/GetAssistancePage.js @@ -59,7 +59,6 @@ const GetAssistancePage = props => ( onPress: () => Link.openExternalLink(CONST.NEWHELP_URL), icon: Expensicons.QuestionMark, shouldShowRightIcon: true, - iconFill: themeColors.success, wrapperStyle: [styles.cardMenuItem], }, ]} From 2c6f03b7280c116d9b4d24f62eb1b6c5051e969f Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sun, 15 Jan 2023 02:45:09 -0800 Subject: [PATCH 23/31] fix room header avatar overlay border radius is missing --- src/components/RoomHeaderAvatars.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/RoomHeaderAvatars.js b/src/components/RoomHeaderAvatars.js index 7d8b5f13400..0bde27133d2 100644 --- a/src/components/RoomHeaderAvatars.js +++ b/src/components/RoomHeaderAvatars.js @@ -76,7 +76,7 @@ const RoomHeaderAvatars = (props) => { <> From 7229212c35586abf6c14e7a545c4981eb70ef69f Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Thu, 29 Dec 2022 10:09:32 -0700 Subject: [PATCH 24/31] Re-revert https://github.com/Expensify/App/pull/13758 --- src/libs/actions/SignInRedirect.js | 41 +++++++++++++++++------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index e66e50cab26..0c7ba243465 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -6,20 +6,6 @@ import * as Localize from '../Localize'; import * as PersistedRequests from './PersistedRequests'; import NetworkConnection from '../NetworkConnection'; -let currentActiveClients; -Onyx.connect({ - key: ONYXKEYS.ACTIVE_CLIENTS, - callback: (val) => { - currentActiveClients = !val ? [] : val; - }, -}); - -let currentPreferredLocale; -Onyx.connect({ - key: ONYXKEYS.NVP_PREFERRED_LOCALE, - callback: val => currentPreferredLocale = val, -}); - let currentIsOffline; let currentShouldForceOffline; Onyx.connect({ @@ -37,10 +23,29 @@ Onyx.connect({ * @param {String} errorMessage */ function clearStorageAndRedirect(errorMessage) { - const activeClients = currentActiveClients; - const preferredLocale = currentPreferredLocale; - const isOffline = currentIsOffline; - const shouldForceOffline = currentShouldForceOffline; + // Under certain conditions, there are key-values we'd like to keep in storage even when a user is logged out. + // We pass these into the clear() method in order to avoid having to reset them on a delayed tick and getting + // flashes of unwanted default state. + const keysToPreserve = []; + keysToPreserve.push(ONYXKEYS.NVP_PREFERRED_LOCALE); + keysToPreserve.push(ONYXKEYS.ACTIVE_CLIENTS); + + // After signing out, set ourselves as offline if we were offline before logging out and we are not forcing it. + // If we are forcing offline, ignore it while signed out, otherwise it would require a refresh because there's no way to toggle the switch to go back online while signed out. + if (currentIsOffline && !currentShouldForceOffline) { + keysToPreserve.push(ONYXKEYS.NETWORK); + } + + Onyx.clear(keysToPreserve) + .then(() => { + if (!errorMessage) { + return; + } + + // `Onyx.clear` reinitializes the Onyx instance with initial values so use `Onyx.merge` instead of `Onyx.set` + Onyx.merge(ONYXKEYS.SESSION, {errors: {[DateUtils.getMicroseconds()]: Localize.translateLocal(errorMessage)}}); + }); + // Clearing storage discards the authToken. This causes a redirect to the SignIn screen Onyx.clear() From 9be7f6b4df980f4f6176f2cf9d944cce8aba8c4e Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Mon, 2 Jan 2023 14:48:38 -0800 Subject: [PATCH 25/31] Remove bad merge conflict --- src/libs/actions/SignInRedirect.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index 0c7ba243465..c7b1079c04f 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -45,29 +45,6 @@ function clearStorageAndRedirect(errorMessage) { // `Onyx.clear` reinitializes the Onyx instance with initial values so use `Onyx.merge` instead of `Onyx.set` Onyx.merge(ONYXKEYS.SESSION, {errors: {[DateUtils.getMicroseconds()]: Localize.translateLocal(errorMessage)}}); }); - - - // Clearing storage discards the authToken. This causes a redirect to the SignIn screen - Onyx.clear() - .then(() => { - if (preferredLocale) { - Onyx.set(ONYXKEYS.NVP_PREFERRED_LOCALE, preferredLocale); - } - if (activeClients && activeClients.length > 0) { - Onyx.set(ONYXKEYS.ACTIVE_CLIENTS, activeClients); - } - - // After signing out, set ourselves as offline if we were offline before logging out and we are not forcing it. - // If we are forcing offline, ignore it while signed out, otherwise it would require a refresh because there's no way to toggle the switch to go back online while signed out. - if (isOffline && !shouldForceOffline) { - Onyx.set(ONYXKEYS.NETWORK, {isOffline}); - } - - // `Onyx.clear` reinitialize the Onyx instance with initial values so use `Onyx.merge` instead of `Onyx.set` - if (errorMessage) { - Onyx.merge(ONYXKEYS.SESSION, {errors: {[DateUtils.getMicroseconds()]: Localize.translateLocal(errorMessage)}}); - } - }); } /** From 3acbe722c24ea0e1a26ada2f64508dcde0187556 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Mon, 2 Jan 2023 16:16:50 -0800 Subject: [PATCH 26/31] Add some timing of Onyx.clear --- src/libs/actions/SignInRedirect.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index c7b1079c04f..7ff0a85808b 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -5,6 +5,7 @@ import DateUtils from '../DateUtils'; import * as Localize from '../Localize'; import * as PersistedRequests from './PersistedRequests'; import NetworkConnection from '../NetworkConnection'; +import Timing from './Timing'; let currentIsOffline; let currentShouldForceOffline; @@ -36,8 +37,10 @@ function clearStorageAndRedirect(errorMessage) { keysToPreserve.push(ONYXKEYS.NETWORK); } + Timing.start('clear'); Onyx.clear(keysToPreserve) .then(() => { + Timing.end('clear'); if (!errorMessage) { return; } From d48c9d4872de2a47cb39ae2dd13df301a0f97f1f Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Tue, 3 Jan 2023 15:08:41 -0800 Subject: [PATCH 27/31] Don't sign out until Onyx.clear() is finished --- src/libs/actions/Session/index.js | 14 +------------- src/libs/actions/SignInRedirect.js | 2 -- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/libs/actions/Session/index.js b/src/libs/actions/Session/index.js index ddd53f65e92..52e0eb0e28a 100644 --- a/src/libs/actions/Session/index.js +++ b/src/libs/actions/Session/index.js @@ -55,18 +55,6 @@ Onyx.connect({ function signOut() { Log.info('Flushing logs before signing out', true, {}, true); - const optimisticData = [ - { - onyxMethod: CONST.ONYX.METHOD.SET, - key: ONYXKEYS.SESSION, - value: null, - }, - { - onyxMethod: CONST.ONYX.METHOD.SET, - key: ONYXKEYS.CREDENTIALS, - value: {}, - }, - ]; API.write('LogOut', { // Send current authToken because we will immediately clear it once triggering this command authToken: NetworkStore.getAuthToken(), @@ -74,7 +62,7 @@ function signOut() { partnerName: CONFIG.EXPENSIFY.PARTNER_NAME, partnerPassword: CONFIG.EXPENSIFY.PARTNER_PASSWORD, shouldRetry: false, - }, {optimisticData}); + }); Timing.clearData(); } diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index 7ff0a85808b..aaccbf35ef5 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -37,10 +37,8 @@ function clearStorageAndRedirect(errorMessage) { keysToPreserve.push(ONYXKEYS.NETWORK); } - Timing.start('clear'); Onyx.clear(keysToPreserve) .then(() => { - Timing.end('clear'); if (!errorMessage) { return; } From 937605b55d605585cc9a1f1f4f20cd2dbdbad54f Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Thu, 12 Jan 2023 08:26:45 -0800 Subject: [PATCH 28/31] Update react-native-onyx version --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a75657407e6..b8ac9685fca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,7 +68,7 @@ "react-native-image-picker": "^4.10.2", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.32", + "react-native-onyx": "1.0.34", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", "react-native-permissions": "^3.0.1", @@ -35507,9 +35507,9 @@ } }, "node_modules/react-native-onyx": { - "version": "1.0.32", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.32.tgz", - "integrity": "sha512-mhmCrxYfNlLM8bpP2M5g1u90115VqbJ1Lt2PjyrQsJihHRTdc7yqbiWwWlEQ1KyAYVR79JCSesKelgkdRAZIag==", + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.34.tgz", + "integrity": "sha512-k2iqx72KWr/Ggwao/FtJwHwopz2h9ByRc2dIIkUG3APba7+xMZC7JSUMJCoopoQXIht/k0eVL8kXsPXSZElKNg==", "dependencies": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", @@ -69938,9 +69938,9 @@ } }, "react-native-onyx": { - "version": "1.0.32", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.32.tgz", - "integrity": "sha512-mhmCrxYfNlLM8bpP2M5g1u90115VqbJ1Lt2PjyrQsJihHRTdc7yqbiWwWlEQ1KyAYVR79JCSesKelgkdRAZIag==", + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.34.tgz", + "integrity": "sha512-k2iqx72KWr/Ggwao/FtJwHwopz2h9ByRc2dIIkUG3APba7+xMZC7JSUMJCoopoQXIht/k0eVL8kXsPXSZElKNg==", "requires": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", diff --git a/package.json b/package.json index d893766bbcd..c99e83a1637 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "react-native-image-picker": "^4.10.2", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.32", + "react-native-onyx": "1.0.34", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", "react-native-permissions": "^3.0.1", From 0bd7ba5f38d968f69e3ee6b0602586ab9977ac37 Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Thu, 12 Jan 2023 16:12:36 -0800 Subject: [PATCH 29/31] Update react-native-onyx version --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b8ac9685fca..7ce33483263 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,7 +68,7 @@ "react-native-image-picker": "^4.10.2", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.34", + "react-native-onyx": "1.0.35", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", "react-native-permissions": "^3.0.1", @@ -35507,9 +35507,9 @@ } }, "node_modules/react-native-onyx": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.34.tgz", - "integrity": "sha512-k2iqx72KWr/Ggwao/FtJwHwopz2h9ByRc2dIIkUG3APba7+xMZC7JSUMJCoopoQXIht/k0eVL8kXsPXSZElKNg==", + "version": "1.0.35", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.35.tgz", + "integrity": "sha512-HQDSM0c2ADb54NoSQdxqeJOhViICB9HwE8aMEB62AdHkRw6crCoIX7iSIF0ewbZ2A/hbX3frewWq8AUh3AyMvA==", "dependencies": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", @@ -69938,9 +69938,9 @@ } }, "react-native-onyx": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.34.tgz", - "integrity": "sha512-k2iqx72KWr/Ggwao/FtJwHwopz2h9ByRc2dIIkUG3APba7+xMZC7JSUMJCoopoQXIht/k0eVL8kXsPXSZElKNg==", + "version": "1.0.35", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.35.tgz", + "integrity": "sha512-HQDSM0c2ADb54NoSQdxqeJOhViICB9HwE8aMEB62AdHkRw6crCoIX7iSIF0ewbZ2A/hbX3frewWq8AUh3AyMvA==", "requires": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", diff --git a/package.json b/package.json index c99e83a1637..25c960d96a1 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "react-native-image-picker": "^4.10.2", "react-native-image-size": "git+https://github.com/Expensify/react-native-image-size#6b5ab5110dc3ed554f8eafbc38d7d87c17147972", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.34", + "react-native-onyx": "1.0.35", "react-native-pdf": "^6.6.2", "react-native-performance": "^4.0.0", "react-native-permissions": "^3.0.1", From 62a71f0c3aa1b1dca1dbf6b88bc8e692fe14687f Mon Sep 17 00:00:00 2001 From: Tim Golen Date: Fri, 13 Jan 2023 13:19:35 -0700 Subject: [PATCH 30/31] Update src/libs/actions/SignInRedirect.js Co-authored-by: Luthfi --- src/libs/actions/SignInRedirect.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index aaccbf35ef5..c7b1079c04f 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -5,7 +5,6 @@ import DateUtils from '../DateUtils'; import * as Localize from '../Localize'; import * as PersistedRequests from './PersistedRequests'; import NetworkConnection from '../NetworkConnection'; -import Timing from './Timing'; let currentIsOffline; let currentShouldForceOffline; From d724aa6ad5540b85bf9c1262cace58536c1a20a9 Mon Sep 17 00:00:00 2001 From: Eugene Voloshchak Date: Sun, 15 Jan 2023 12:42:39 +0200 Subject: [PATCH 31/31] Remove iconFill property from get help icon --- src/pages/GetAssistancePage.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/GetAssistancePage.js b/src/pages/GetAssistancePage.js index fea935c176c..2f849c9a998 100644 --- a/src/pages/GetAssistancePage.js +++ b/src/pages/GetAssistancePage.js @@ -59,7 +59,6 @@ const GetAssistancePage = props => ( onPress: () => Link.openExternalLink(CONST.NEWHELP_URL), icon: Expensicons.QuestionMark, shouldShowRightIcon: true, - iconFill: themeColors.success, wrapperStyle: [styles.cardMenuItem], }, ]}