diff --git a/package-lock.json b/package-lock.json index 2cc7b84ba411..8edf15c4a2f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19245,8 +19245,8 @@ "integrity": "sha1-RvGKMgQyCYol6p+on1FD3SVNMy0=" }, "react-native-onyx": { - "version": "git+ssh://git@github.com/Expensify/react-native-onyx.git#ef8744a5d2af75d786baa580239fc380534fb89d", - "from": "git+ssh://git@github.com/Expensify/react-native-onyx.git#ef8744a5d2af75d786baa580239fc380534fb89d", + "version": "git+ssh://git@github.com/Expensify/react-native-onyx.git#3638b1818dcd8cf7ff8aef1ca984ceba55cca806", + "from": "git+ssh://git@github.com/Expensify/react-native-onyx.git#3638b1818dcd8cf7ff8aef1ca984ceba55cca806", "requires": { "@react-native-community/async-storage": "^1.12.1", "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#5002f0a429e8c62bfc9daa7cbe35864784e67407", diff --git a/package.json b/package.json index 1c33384b87e2..8e2bf002ee2b 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "react-native-document-picker": "^4.0.0", "react-native-image-picker": "^2.3.3", "react-native-keyboard-spacer": "^0.4.1", - "react-native-onyx": "git+https://git@github.com:Expensify/react-native-onyx.git#ef8744a5d2af75d786baa580239fc380534fb89d", + "react-native-onyx": "git+https://git@github.com:Expensify/react-native-onyx.git#3638b1818dcd8cf7ff8aef1ca984ceba55cca806", "react-native-render-html": "^4.2.3", "react-native-safe-area-context": "^3.1.4", "react-native-web": "^0.13.5", diff --git a/src/libs/ActiveClientManager/index.js b/src/libs/ActiveClientManager/index.js index 320573f10c7d..c640aaf9ad60 100644 --- a/src/libs/ActiveClientManager/index.js +++ b/src/libs/ActiveClientManager/index.js @@ -10,7 +10,7 @@ let activeClients; Onyx.connect({ key: ONYXKEYS.ACTIVE_CLIENTS, callback: (val) => { - activeClients = _.isNull(val) ? [] : val; + activeClients = !val ? [] : val; if (activeClients.length >= maxClients) { activeClients.shift(); Onyx.set(ONYXKEYS.ACTIVE_CLIENTS, activeClients); diff --git a/src/pages/home/HomePage.js b/src/pages/home/HomePage.js index 6b6272b67029..5a7becb40451 100644 --- a/src/pages/home/HomePage.js +++ b/src/pages/home/HomePage.js @@ -9,7 +9,6 @@ import { Keyboard, Pressable, } from 'react-native'; -import _ from 'underscore'; import {SafeAreaInsetsContext, SafeAreaProvider} from 'react-native-safe-area-context'; import {withOnyx} from 'react-native-onyx'; import {Route} from '../../libs/Router'; @@ -58,10 +57,8 @@ class App extends React.Component { this.showHamburger = this.showHamburger.bind(this); this.toggleHamburgerBasedOnDimensions = this.toggleHamburgerBasedOnDimensions.bind(this); - // Note: This null check is only necessary because withOnyx passes null for bound props - // that are null-initialized initialized in Onyx, and defaultProps only replaces for `undefined` values this.animationTranslateX = new Animated.Value( - !_.isNull(props.isSidebarShown) && !props.isSidebarShown ? -300 : 0 + !props.isSidebarShown ? -300 : 0 ); } diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index b739ccb6a58a..52d5eda46ef2 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -168,7 +168,7 @@ class ReportActionCompose extends React.Component { onChangeText={this.updateComment} onKeyPress={this.triggerSubmitShortcut} style={[styles.textInput, styles.textInputCompose, styles.flex4]} - defaultValue={this.props.comment || ''} + defaultValue={this.props.comment} maxLines={16} // This is the same that slack has onFocus={() => this.setIsFocused(true)} onBlur={() => this.setIsFocused(false)} diff --git a/src/pages/home/report/ReportTypingIndicator.js b/src/pages/home/report/ReportTypingIndicator.js index 7311f25adce1..46faa9f70173 100644 --- a/src/pages/home/report/ReportTypingIndicator.js +++ b/src/pages/home/report/ReportTypingIndicator.js @@ -21,7 +21,7 @@ class ReportTypingIndicator extends React.Component { constructor(props) { super(props); - const usersTyping = Object.keys(props.userTypingStatuses || {}) + const usersTyping = Object.keys(props.userTypingStatuses) .filter(login => props.userTypingStatuses[login]); this.state = {usersTyping}; } @@ -29,7 +29,7 @@ class ReportTypingIndicator extends React.Component { componentDidUpdate(prevProps) { // Make sure we only update the state if there's been a change in who's typing. if (!_.isEqual(prevProps.userTypingStatuses, this.props.userTypingStatuses)) { - const usersTyping = Object.keys(this.props.userTypingStatuses || {}) + const usersTyping = Object.keys(this.props.userTypingStatuses) .filter(login => this.props.userTypingStatuses[login]); // Suppressing because this is within a conditional, and hence we won't run into an infinite loop