Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/libs/ActiveClientManager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 1 addition & 4 deletions src/pages/home/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/report/ReportTypingIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ 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};
}

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
Expand Down