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 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 1001013701
versionName "1.1.37-1"
versionCode 1001013702
versionName "1.1.37-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 @@ -31,7 +31,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.1.37.1</string>
<string>1.1.37.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.37.1</string>
<string>1.1.37.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.37-1",
"version": "1.1.37-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
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ const CONST = {
HOMEPAGE_REPORTS_LOADED: 'homepage_reports_loaded',
SWITCH_REPORT: 'switch_report',
SIDEBAR_LOADED: 'sidebar_loaded',
PERSONAL_DETAILS_FORMATTED: 'personal_details_formatted',
COLD: 'cold',
REPORT_ACTION_ITEM_LAYOUT_DEBOUNCE_TIME: 1500,
TOOLTIP_SENSE: 1000,
Expand Down
50 changes: 28 additions & 22 deletions src/libs/actions/PersonalDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as ReportUtils from '../reportUtils';
import * as OptionsListUtils from '../OptionsListUtils';
import Growl from '../Growl';
import * as Localize from '../Localize';
import Timing from './Timing';

let currentUserEmail = '';
Onyx.connect({
Expand Down Expand Up @@ -82,32 +83,37 @@ function getMaxCharacterError(isError) {
* @return {Object}
*/
function formatPersonalDetails(personalDetailsList) {
return _.reduce(personalDetailsList, (finalObject, personalDetailsResponse, login) => {
Timing.start(CONST.TIMING.PERSONAL_DETAILS_FORMATTED);
const formattedResult = {};

// This method needs to be SUPER PERFORMANT because it can be called with a massive list of logins depending on the policies that someone belongs to
// eslint-disable-next-line rulesdir/prefer-underscore-method
Object.keys(personalDetailsList).forEach((login) => {
const personalDetailsResponse = personalDetailsList[login];

// Form the details into something that has all the data in an easy to use format.
const avatar = getAvatar(personalDetailsResponse, login);
const displayName = getDisplayName(login, personalDetailsResponse);
const pronouns = lodashGet(personalDetailsResponse, 'pronouns', '');
const timezone = lodashGet(personalDetailsResponse, 'timeZone', CONST.DEFAULT_TIME_ZONE);
const firstName = lodashGet(personalDetailsResponse, 'firstName', '');
const lastName = lodashGet(personalDetailsResponse, 'lastName', '');
const payPalMeAddress = lodashGet(personalDetailsResponse, 'expensify_payPalMeAddress', '');
const phoneNumber = lodashGet(personalDetailsResponse, 'phoneNumber', '');

return {
...finalObject,
[login]: {
login,
avatar,
displayName,
firstName,
lastName,
pronouns,
timezone,
payPalMeAddress,
phoneNumber,
},
const pronouns = personalDetailsResponse.pronouns || '';
const timezone = personalDetailsResponse.timeZone || CONST.DEFAULT_TIME_ZONE;
const firstName = personalDetailsResponse.firstName || '';
const lastName = personalDetailsResponse.lastName || '';
const payPalMeAddress = personalDetailsResponse.expensify_payPalMeAddress || '';
const phoneNumber = personalDetailsResponse.phoneNumber || '';
formattedResult[login] = {
login,
avatar,
displayName,
firstName,
lastName,
pronouns,
timezone,
payPalMeAddress,
phoneNumber,
};
}, {});
});
Timing.end(CONST.TIMING.PERSONAL_DETAILS_FORMATTED);
return formattedResult;
}

/**
Expand Down