Skip to content

Commit

Permalink
Merge branch 'main' into blimpich-revert-42374
Browse files Browse the repository at this point in the history
  • Loading branch information
blimpich committed Jun 7, 2024
2 parents b3196ab + 26cf7ac commit 2bdd834
Show file tree
Hide file tree
Showing 135 changed files with 577 additions and 324 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001048006
versionName "1.4.80-6"
versionCode 1001048009
versionName "1.4.80-9"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.4.80.6</string>
<string>1.4.80.9</string>
<key>FullStory</key>
<dict>
<key>OrgId</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.4.80.6</string>
<string>1.4.80.9</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>1.4.80</string>
<key>CFBundleVersion</key>
<string>1.4.80.6</string>
<string>1.4.80.9</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "1.4.80-6",
"version": "1.4.80-9",
"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 Expand Up @@ -259,7 +259,7 @@
"electron-builder": "24.13.2",
"eslint": "^7.6.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-expensify": "^2.0.49",
"eslint-config-expensify": "^2.0.50",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^24.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function extractAttachments(
const splittedUrl = attribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE].split('/');
attachments.unshift({
source: tryResolveUrlFromApiRoot(attribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE]),
isAuthTokenRequired: Boolean(attribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE]),
isAuthTokenRequired: !!attribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE],
file: {name: splittedUrl[splittedUrl.length - 1]},
duration: Number(attribs[CONST.ATTACHMENT_DURATION_ATTRIBUTE]),
isReceipt: false,
Expand Down Expand Up @@ -69,7 +69,7 @@ function extractAttachments(
attachments.unshift({
reportActionID: attribs['data-id'],
source,
isAuthTokenRequired: Boolean(expensifySource),
isAuthTokenRequired: !!expensifySource,
file: {name: fileName},
isReceipt: false,
hasBeenFlagged: attribs['data-flagged'] === 'true',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function Button(
large && styles.buttonLargeText,
success && styles.buttonSuccessText,
danger && styles.buttonDangerText,
Boolean(icon) && styles.textAlignLeft,
!!icon && styles.textAlignLeft,
textStyles,
]}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
Expand Down Expand Up @@ -329,7 +329,7 @@ function Button(
]}
style={[
styles.button,
StyleUtils.getButtonStyleWithIcon(styles, small, medium, large, Boolean(icon), Boolean(text?.length > 0), shouldShowRightIcon),
StyleUtils.getButtonStyleWithIcon(styles, small, medium, large, !!icon, !!(text?.length > 0), shouldShowRightIcon),
success ? styles.buttonSuccess : undefined,
danger ? styles.buttonDanger : undefined,
isDisabled ? styles.buttonOpacityDisabled : undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/components/ConfirmedRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function ConfirmedRoute({mapboxAccessToken, transaction, isSmallerIcon, shouldHa

const shouldDisplayMap = !requireRouteToDisplayMap || !!coordinates.length;

return !isOffline && Boolean(mapboxAccessToken?.token) && shouldDisplayMap ? (
return !isOffline && !!mapboxAccessToken?.token && shouldDisplayMap ? (
<DistanceMapView
interactive={interactive}
accessToken={mapboxAccessToken?.token ?? ''}
Expand Down
2 changes: 1 addition & 1 deletion src/components/DatePicker/CalendarPicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function CalendarPicker({
style={themeStyles.calendarDayRoot}
accessibilityLabel={day?.toString() ?? ''}
tabIndex={day ? 0 : -1}
accessible={Boolean(day)}
accessible={!!day}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
>
{({hovered, pressed}) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/DisplayNames/DisplayNamesWithTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function DisplayNamesWithToolTip({shouldUseFullTitle, fullTitle, displayNamesWit
</Fragment>
))}
{renderAdditionalText?.()}
{Boolean(isEllipsisActive) && (
{!!isEllipsisActive && (
<View style={styles.displayNameTooltipEllipsis}>
<Tooltip text={fullTitle}>
{/* There is some Gap for real ellipsis so we are adding 4 `.` to cover */}
Expand Down
2 changes: 1 addition & 1 deletion src/components/FocusableMenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function FocusableMenuItem(props: MenuItemProps) {
const ref = useRef<View>(null);

// Sync focus on an item
useSyncFocus(ref, Boolean(props.focused));
useSyncFocus(ref, !!props.focused);

return (
<MenuItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function AnchorRenderer({tnode, style, key}: AnchorRendererProps) {
const htmlAttribs = tnode.attributes;
const {environmentURL} = useEnvironment();
// An auth token is needed to download Expensify chat attachments
const isAttachment = Boolean(htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE]);
const isAttachment = !!htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE];
const tNodeChild = tnode?.domNode?.children?.[0];
const displayName = tNodeChild && 'data' in tNodeChild && typeof tNodeChild.data === 'string' ? tNodeChild.data : '';
const parentStyle = tnode.parent?.styles?.nativeTextRet ?? {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function EditedRenderer({tnode, TDefaultRenderer, style, ...defaultRendererProps
const theme = useTheme();
const styles = useThemeStyles();
const {translate} = useLocalize();
const isPendingDelete = Boolean(tnode.attributes.deleted !== undefined);
const isPendingDelete = !!(tnode.attributes.deleted !== undefined);
return (
<Text>
<Text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function ImageRenderer({tnode}: ImageRendererProps) {
// control and thus require no authToken to verify access.
//
const attachmentSourceAttribute = htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE];
const isAttachmentOrReceipt = Boolean(attachmentSourceAttribute);
const isAttachmentOrReceipt = !!attachmentSourceAttribute;

// Files created/uploaded/hosted by App should resolve from API ROOT. Other URLs aren't modified
const previewSource = tryResolveUrlFromApiRoot(htmlAttribs.src);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Header({title = '', subtitle = '', textStyles = [], containerStyles = [
<>
{/* If there's no subtitle then display a fragment to avoid an empty space which moves the main title */}
{typeof subtitle === 'string'
? Boolean(subtitle) && (
? !!subtitle && (
<Text
style={[styles.mutedTextLabel, styles.pre]}
numberOfLines={1}
Expand All @@ -47,7 +47,7 @@ function Header({title = '', subtitle = '', textStyles = [], containerStyles = [
<View style={[styles.flex1, styles.flexRow, containerStyles]}>
<View style={styles.mw100}>
{typeof title === 'string'
? Boolean(title) && (
? !!title && (
<Text
numberOfLines={2}
style={[styles.headerText, styles.textLarge, textStyles]}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MapView/MapView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const MapView = forwardRef<MapViewHandle, ComponentProps>(
}, [directionCoordinates, currentPosition, mapPadding, waypoints]);

const centerCoordinate = currentPosition ? [currentPosition.longitude, currentPosition.latitude] : initialState?.location;
return !isOffline && Boolean(accessToken) && Boolean(currentPosition) ? (
return !isOffline && !!accessToken && !!currentPosition ? (
<View style={[style, !interactive ? styles.pointerEventsNone : {}]}>
<Mapbox.MapView
style={{flex: 1}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MapView/MapView.website.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const MapView = forwardRef<MapViewHandle, ComponentProps>(
});
}, [directionCoordinates, currentPosition, mapRef, waypoints, mapPadding]);

return !isOffline && Boolean(accessToken) && Boolean(currentPosition) ? (
return !isOffline && !!accessToken && !!currentPosition ? (
<View
style={style}
// eslint-disable-next-line react/jsx-props-no-spreading
Expand Down
2 changes: 1 addition & 1 deletion src/components/MentionSuggestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSe
>
{styledHandle?.map(
({text, isColored}, i) =>
Boolean(text) && (
!!text && (
<Text
// eslint-disable-next-line react/no-array-index-key
key={`${text}${i}`}
Expand Down
Loading

0 comments on commit 2bdd834

Please sign in to comment.