Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version to 1.1.70-2 on staging #9274

Merged
merged 33 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4fb557f
add minimum width
thesahindia May 4, 2022
7488136
fix footer message overflow
thesahindia May 4, 2022
470d18b
Merge branch 'main' of github.com:thesahindia/App into thesahindia/io…
thesahindia May 18, 2022
392287d
show the activity indicator above the hidden text
thesahindia May 18, 2022
f49aaa2
use button
thesahindia May 18, 2022
f457cb6
remove minimum width
thesahindia May 18, 2022
da3ca72
Rely on contents of push to determine if it was a chunked push
May 27, 2022
3fcc40f
Remove isChunked from subscribe
May 27, 2022
12fa3bb
More isChunked removal
May 27, 2022
227508e
Merge branch 'main' into amechler-chunked-pusher
May 27, 2022
50cce05
fix package-lock
May 27, 2022
8f7694f
Revert to mains package-lock.json
May 27, 2022
b4393eb
add key to onInputChange, refactor AddressSearch
luacmartins May 27, 2022
671dd98
update docs
luacmartins May 27, 2022
de86dfc
change status bar color when modal is open
Tushu17 May 28, 2022
3853017
Close Drawer or popup after pressing Download
sobitneupane May 30, 2022
2bedb84
resolve conflicts
thesahindia May 30, 2022
5e1f26b
Migrate RequestCallPage to new API
nkuoch May 30, 2022
ae4fce9
Fetch actions for policyExpenseChats so we're guaranteed to get the l…
May 31, 2022
66ad6d7
Lint fixes
May 31, 2022
c0bade5
Update comment
May 31, 2022
bed9d6e
Merge pull request #9212 from sobitneupane/sn_bug-close-drawer-on-dow…
neil-marcellini May 31, 2022
29f07d2
Merge pull request #8878 from thesahindia/thesahindia/archived-room-b…
deetergp May 31, 2022
3e0ba3a
use differnt color for gray button
thesahindia Jun 1, 2022
d18d7bc
Merge pull request #9262 from Expensify/amal-workspace-chat-instant-a…
MariaHCD Jun 1, 2022
9a28393
Merge pull request #9220 from Expensify/nat-requestcallpage
MariaHCD Jun 1, 2022
ac2411e
Merge pull request #9207 from Expensify/cmartins-formSetNativeProps
Julesssss Jun 1, 2022
e05524c
Merge pull request #8877 from thesahindia/thesahindia/iou-button
roryabraham Jun 1, 2022
14176c5
Merge pull request #9203 from Expensify/amechler-chunked-pusher
Jun 1, 2022
b38622d
Merge pull request #9210 from Tushu17/fix-status-bar
mountiny Jun 1, 2022
11d4103
Update version to 1.1.70-2
OSBotify Jun 1, 2022
c41a782
Merge pull request #9273 from Expensify/version-BUILD-b38622d3bc88397…
OSBotify Jun 1, 2022
1f33473
Merge branch 'main' into update-staging-from-main
OSBotify Jun 1, 2022
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
2 changes: 1 addition & 1 deletion FORMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,4 @@ Form.js will automatically provide the following props to any input with the inp
- defaultValue: The input default value.
- errorText: The translated error text that is returned by validate for that specific input.
- onBlur: An onBlur handler that calls validate.
- onChange: An onChange handler that saves draft values and calls validate.
- onInputChange: An onChange handler that saves draft values and calls validate for that input (inputA). Passing an inputID as a second param allows inputA to manipulate the input value of the provided inputID (inputB).
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001017001
versionName "1.1.70-1"
versionCode 1001017002
versionName "1.1.70-2"
}
splits {
abi {
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.70.1</string>
<string>1.1.70.2</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.1.70.1</string>
<string>1.1.70.2</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.1.70-1",
"version": "1.1.70-2",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
8 changes: 6 additions & 2 deletions src/components/AddressSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ const AddressSearch = (props) => {
if (_.size(values) === 0) {
return;
}
props.onInputChange(values);
if (props.inputID) {
_.each(values, (value, key) => props.onInputChange(value, key));
} else {
props.onInputChange(values);
}
};

return (
Expand Down Expand Up @@ -161,7 +165,7 @@ const AddressSearch = (props) => {
label: props.label,
containerStyles: props.containerStyles,
errorText: props.errorText,
hint: props.hint,
hint: displayListViewBorder ? undefined : props.hint,
value: props.value,
defaultValue: props.defaultValue,
inputID: props.inputID,
Expand Down
1 change: 1 addition & 0 deletions src/components/Banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const Banner = props => (
styles.p5,
styles.borderRadiusNormal,
isHovered ? styles.activeComponentBG : styles.hoveredComponentBG,
styles.breakAll,
]}
>
<View style={[styles.mr3]}>
Expand Down
11 changes: 7 additions & 4 deletions src/components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,11 @@ class Button extends Component {
return <ContentComponent />;
}

if (this.props.isLoading) {
return <ActivityIndicator color={themeColors.textReversed} />;
}

const textComponent = (
<Text
selectable={false}
style={[
this.props.isLoading && styles.opacity0,
styles.pointerEventsNone,
styles.buttonText,
this.props.small && styles.buttonSmallText,
Expand Down Expand Up @@ -273,6 +270,12 @@ class Button extends Component {
]}
>
{this.renderContent()}
{this.props.isLoading && (
<ActivityIndicator
color={(this.props.success || this.props.danger) ? themeColors.textReversed : themeColors.text}
style={[styles.pAbsolute, styles.l0, styles.r0]}
/>
)}
</OpacityView>
)}
</Pressable>
Expand Down
12 changes: 9 additions & 3 deletions src/components/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,16 @@ class Form extends React.Component {
this.setTouchedInput(inputID);
this.validate(this.inputValues);
},
onInputChange: (value) => {
this.inputValues[inputID] = value;
onInputChange: (value, key) => {
const inputKey = key || inputID;
this.inputValues[inputKey] = value;
const inputRef = this.inputRefs[inputKey];

if (key && inputRef && _.isFunction(inputRef.setNativeProps)) {
inputRef.setNativeProps({value});
}
if (child.props.shouldSaveDraft) {
FormActions.setDraftValues(this.props.formID, {[inputID]: value});
FormActions.setDraftValues(this.props.formID, {[inputKey]: value});
}
this.validate(this.inputValues);
},
Expand Down
1 change: 1 addition & 0 deletions src/components/Modal/BaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class BaseModal extends PureComponent {
);
return (
<ReactNativeModal
statusBarTranslucent
onBackdropPress={(e) => {
if (e && e.type === 'keydown' && e.key === 'Enter') {
return;
Expand Down
35 changes: 8 additions & 27 deletions src/components/ReportTransaction.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import lodashGet from 'lodash/get';
import {
View, Pressable, ActivityIndicator,
} from 'react-native';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import ONYXKEYS from '../ONYXKEYS';
import styles from '../styles/styles';
import themeColors from '../styles/themes/default';
import * as IOU from '../libs/actions/IOU';
import reportActionPropTypes from '../pages/home/report/reportActionPropTypes';
import ReportActionItemSingle from '../pages/home/report/ReportActionItemSingle';
import Text from './Text';
import Button from './Button';

const propTypes = {
/** The chatReport which the transaction is associated with */
Expand Down Expand Up @@ -88,30 +86,13 @@ class ReportTransaction extends Component {
</ReportActionItemSingle>
{this.props.canBeRejected && (
<View style={[styles.flexRow, styles.justifyContentStart]}>
<Pressable
style={[
styles.buttonSmall,
styles.chatItemComposeSecondaryRowOffset,
styles.mb3,
this.isBeingRejected() ? styles.w20 : styles.wAuto,
]}
<Button
small
text={this.props.rejectButtonLabelText}
style={[styles.mb3, styles.chatItemComposeSecondaryRowOffset]}
onPress={this.rejectTransaction}
>
{
this.isBeingRejected()
? (
<ActivityIndicator
color={themeColors.text}
style={[styles.flex1]}
/>
)
: (
<Text style={[styles.buttonSmallText]}>
{this.props.rejectButtonLabelText}
</Text>
)
}
</Pressable>
isLoading={this.isBeingRejected()}
/>
</View>
)}
</View>
Expand Down
13 changes: 4 additions & 9 deletions src/libs/Pusher/pusher.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,10 @@ function getChannel(channelName) {
* @param {Pusher.Channel} channel
* @param {String} eventName
* @param {Function} [eventCallback]
* @param {Boolean} [isChunked] Do we expect this channel to send chunked/separate blocks of data that need recombining?
*
* @private
*/
function bindEventToChannel(channel, eventName, eventCallback = () => {}, isChunked = false) {
function bindEventToChannel(channel, eventName, eventCallback = () => {}) {
if (!eventName) {
return;
}
Expand All @@ -120,7 +119,7 @@ function bindEventToChannel(channel, eventName, eventCallback = () => {}, isChun
Log.alert('[Pusher] Unable to parse JSON response from Pusher', {error: err, eventData});
return;
}
if (!isChunked) {
if (data.id === undefined || data.chunk === undefined || data.final === undefined) {
eventCallback(data);
return;
}
Expand Down Expand Up @@ -169,9 +168,6 @@ function bindEventToChannel(channel, eventName, eventCallback = () => {}, isChun
* @param {String} channelName
* @param {String} eventName
* @param {Function} [eventCallback]
* @param {Boolean} [isChunked] This parameters tells us whether or not we expect the result to come in individual
* pieces/chunks (because it exceeds
* the 10kB limit that pusher has).
* @param {Function} [onResubscribe] Callback to be called when reconnection happen
*
* @return {Promise}
Expand All @@ -182,7 +178,6 @@ function subscribe(
channelName,
eventName,
eventCallback = () => {},
isChunked = false,
onResubscribe = () => {},
) {
return new Promise((resolve, reject) => {
Expand All @@ -201,7 +196,7 @@ function subscribe(
channel.bind('pusher:subscription_succeeded', () => {
// Check so that we do not bind another event with each reconnect attempt
if (!isBound) {
bindEventToChannel(channel, eventName, eventCallback, isChunked);
bindEventToChannel(channel, eventName, eventCallback);
resolve();
isBound = true;
return;
Expand All @@ -225,7 +220,7 @@ function subscribe(
reject(error);
});
} else {
bindEventToChannel(channel, eventName, eventCallback, isChunked);
bindEventToChannel(channel, eventName, eventCallback);
resolve();
}
});
Expand Down
10 changes: 4 additions & 6 deletions src/libs/actions/Inbox.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Onyx from 'react-native-onyx';
import ONYXKEYS from '../../ONYXKEYS';
import * as API from '../API';
import * as DeprecatedAPI from '../deprecatedAPI';
import Growl from '../Growl';
import * as Localize from '../Localize';
Expand Down Expand Up @@ -46,14 +47,11 @@ function requestInboxCall({
});
}

function getInboxCallWaitTime() {
DeprecatedAPI.Inbox_CallUser_WaitTime()
.then((data) => {
Onyx.set(ONYXKEYS.INBOX_CALL_USER_WAIT_TIME, data.waitTime);
});
function openRequestCallPage() {
API.read('OpenRequestCallPage');
}

export {
requestInboxCall,
getInboxCallWaitTime,
openRequestCallPage,
};
5 changes: 4 additions & 1 deletion src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,9 +526,12 @@ function subscribeToPolicyEvents() {
// Remove the members from the policy
Onyx.set(key, policyWithoutEmployee);

// Refetch the policy expense chats to update their state
// Refetch the policy expense chats to update their state and their actions to get the archive reason
if (!_.isEmpty(policyExpenseChatIDs)) {
Report.fetchChatReportsByIDs(policyExpenseChatIDs);
_.each(policyExpenseChatIDs, (reportID) => {
Report.fetchActions(reportID);
});
}

// Remove the default chats if we are one of the users getting removed
Expand Down
13 changes: 4 additions & 9 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,8 @@ function getReportChannelName(reportID) {
*
* @param {String} eventName
* @param {Function} onEvent
* @param {Boolean} isChunked
*/
function subscribeToPrivateUserChannelEvent(eventName, onEvent, isChunked = false) {
function subscribeToPrivateUserChannelEvent(eventName, onEvent) {
const pusherChannelName = `private-encrypted-user-accountID-${currentUserAccountID}${CONFIG.PUSHER.SUFFIX}`;

/**
Expand Down Expand Up @@ -759,7 +758,7 @@ function subscribeToPrivateUserChannelEvent(eventName, onEvent, isChunked = fals
Log.hmmm('[Report] Failed to subscribe to Pusher channel', false, {error, pusherChannelName, eventName});
}

Pusher.subscribe(pusherChannelName, eventName, onEventPush, isChunked, onPusherResubscribeToPrivateUserChannel)
Pusher.subscribe(pusherChannelName, eventName, onEventPush, onPusherResubscribeToPrivateUserChannel)
.catch(onSubscriptionFailed);
}

Expand All @@ -781,17 +780,13 @@ function subscribeToUserEvents() {
subscribeToPrivateUserChannelEvent(Pusher.TYPE.REPORT_COMMENT, pushJSON => updateReportWithNewAction(pushJSON.reportID, pushJSON.reportAction, pushJSON.notificationPreference));

// Live-update a report's actions when a 'chunked report comment' event is received.
subscribeToPrivateUserChannelEvent(
Pusher.TYPE.REPORT_COMMENT_CHUNK,
pushJSON => updateReportWithNewAction(pushJSON.reportID, pushJSON.reportAction, pushJSON.notificationPreference),
true,
);
subscribeToPrivateUserChannelEvent(Pusher.TYPE.REPORT_COMMENT_CHUNK, pushJSON => updateReportWithNewAction(pushJSON.reportID, pushJSON.reportAction, pushJSON.notificationPreference));

// Live-update a report's actions when an 'edit comment' event is received.
subscribeToPrivateUserChannelEvent(Pusher.TYPE.REPORT_COMMENT_EDIT, pushJSON => updateReportActionMessage(pushJSON.reportID, pushJSON.sequenceNumber, pushJSON.message));

// Live-update a report's actions when an 'edit comment chunk' event is received.
subscribeToPrivateUserChannelEvent(Pusher.TYPE.REPORT_COMMENT_EDIT_CHUNK, pushJSON => updateReportActionMessage(pushJSON.reportID, pushJSON.sequenceNumber, pushJSON.message), true);
subscribeToPrivateUserChannelEvent(Pusher.TYPE.REPORT_COMMENT_EDIT_CHUNK, pushJSON => updateReportActionMessage(pushJSON.reportID, pushJSON.sequenceNumber, pushJSON.message));

// Live-update a report's pinned state when a 'report toggle pinned' event is received.
subscribeToPrivateUserChannelEvent(Pusher.TYPE.REPORT_TOGGLE_PINNED, pushJSON => updateReportPinnedState(pushJSON.reportID, pushJSON.isPinned));
Expand Down
6 changes: 3 additions & 3 deletions src/libs/actions/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function subscribeToUserEvents() {
// Live-update an user's preferred locale
Pusher.subscribe(pusherChannelName, Pusher.TYPE.PREFERRED_LOCALE, (pushJSON) => {
Onyx.merge(ONYXKEYS.NVP_PREFERRED_LOCALE, pushJSON.preferredLocale);
}, false,
},
() => {
NetworkConnection.triggerReconnectionCallbacks('pusher re-subscribed to private user channel');
})
Expand All @@ -320,7 +320,7 @@ function subscribeToUserEvents() {
// Subscribe to screen share requests sent by GuidesPlus agents
Pusher.subscribe(pusherChannelName, Pusher.TYPE.SCREEN_SHARE_REQUEST, (pushJSON) => {
Onyx.merge(ONYXKEYS.SCREEN_SHARE_REQUEST, pushJSON);
}, false,
},
() => {
NetworkConnection.triggerReconnectionCallbacks('pusher re-subscribed to private user channel');
})
Expand Down Expand Up @@ -351,7 +351,7 @@ function subscribeToExpensifyCardUpdates() {
} else {
Onyx.merge(ONYXKEYS.USER, {isCheckingDomain: pushJSON.isCheckingDomain});
}
}, false,
},
() => {
NetworkConnection.triggerReconnectionCallbacks('pusher re-subscribed to private user channel');
})
Expand Down
10 changes: 0 additions & 10 deletions src/libs/deprecatedAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,15 +843,6 @@ function Inbox_CallUser(parameters) {
return Network.post(commandName, parameters);
}

/**
* Get the current wait time in minutes for an inbox call
* @returns {Promise}
*/
function Inbox_CallUser_WaitTime() {
const commandName = 'Inbox_CallUser_WaitTime';
return Network.post(commandName);
}

/**
* @param {Object} parameters
* @param {String} parameters.reportIDList
Expand Down Expand Up @@ -952,7 +943,6 @@ export {
GetRequestCountryCode,
Graphite_Timer,
Inbox_CallUser,
Inbox_CallUser_WaitTime,
PayIOU,
PayWithWallet,
PersonalDetails_GetForEmails,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RequestCallPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class RequestCallPage extends Component {
return;
}

Inbox.getInboxCallWaitTime();
Inbox.openRequestCallPage();
}

validatePhoneInput() {
Expand Down
Loading