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.0.52-4 on staging #3120

Merged
merged 7 commits into from
May 25, 2021
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 @@ -148,8 +148,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1001005203
versionName "1.0.52-3"
versionCode 1001005204
versionName "1.0.52-4"
}
splits {
abi {
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCash/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.0.52.3</string>
<string>1.0.52.4</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/ExpensifyCashTests/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.0.52.3</string>
<string>1.0.52.4</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": "expensify.cash",
"version": "1.0.52-3",
"version": "1.0.52-4",
"author": "Expensify, Inc.",
"homepage": "https://expensify.cash",
"description": "Expensify.cash is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
22 changes: 22 additions & 0 deletions src/components/RenderHTML.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable react/prop-types */
import _ from 'underscore';
import React from 'react';
import PropTypes from 'prop-types';
import {useWindowDimensions, TouchableOpacity} from 'react-native';
Expand All @@ -14,6 +15,9 @@ import AnchorForCommentsOnly from './AnchorForCommentsOnly';
import InlineCodeBlock from './InlineCodeBlock';
import AttachmentModal from './AttachmentModal';
import ThumbnailImage from './ThumbnailImage';
import variables from '../styles/variables';
import themeColors from '../styles/themes/default';
import Text from './Text';

const MAX_IMG_DIMENSIONS = 512;

Expand Down Expand Up @@ -96,6 +100,22 @@ function CodeRenderer({
);
}

function EditedRenderer(props) {
const defaultRendererProps = _.omit(props, ['TDefaultRenderer', 'style', 'tnode']);
return (
<Text
// eslint-disable-next-line react/jsx-props-no-spreading
{...defaultRendererProps}
fontSize={variables.fontSizeSmall}
color={themeColors.textSupporting}
>
{/* Native devices do not support margin between nested text */}
<Text style={styles.w1}>{' '}</Text>
(edited)
</Text>
);
}

function ImgRenderer({tnode}) {
const htmlAttribs = tnode.attributes;

Expand Down Expand Up @@ -158,12 +178,14 @@ function ImgRenderer({tnode}) {
AnchorRenderer.model = defaultHTMLElementModels.a;
CodeRenderer.model = defaultHTMLElementModels.code;
ImgRenderer.model = defaultHTMLElementModels.img;
EditedRenderer.model = defaultHTMLElementModels.span;

// Define the custom render methods
const renderers = {
a: AnchorRenderer,
code: CodeRenderer,
img: ImgRenderer,
edited: EditedRenderer,
};

const propTypes = {
Expand Down
7 changes: 7 additions & 0 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,13 @@ function updateReportActionMessage(reportID, sequenceNumber, message) {
const actionToMerge = {};
actionToMerge[sequenceNumber] = {message: [message]};
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, actionToMerge);

// If this is the most recent message, update the lastMessageText in the report object as well
if (sequenceNumber === reportMaxSequenceNumbers[reportID]) {
Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, {
lastMessageText: message.html,
});
}
}

/**
Expand Down
27 changes: 15 additions & 12 deletions src/pages/home/report/ReportActionItemFragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,27 @@ class ReportActionItemFragment extends React.PureComponent {
}

// Only render HTML if we have html in the fragment
return (
<View style={styles.flexRow}>
{fragment.html !== fragment.text ? (
<RenderHTML html={fragment.html} debug={false} />
) : (
<Text selectable>{Str.htmlDecode(fragment.text)}</Text>
)}
{fragment.isEdited && (
return fragment.html !== fragment.text
? (
<RenderHTML
html={fragment.html + (fragment.isEdited ? '<edited/>' : '')}
debug={false}
/>
) : (
<Text selectable>
{Str.htmlDecode(fragment.text)}
{fragment.isEdited && (
<Text
style={[styles.ml1]}
fontSize={variables.fontSizeSmall}
color={themeColors.textSupporting}
>
{/* Native devices do not support margin between nested text */}
<Text style={styles.w1}>{' '}</Text>
(edited)
</Text>
)}
</View>
);
)}
</Text>
);
case 'TEXT':
return (
<Tooltip text={tooltipText}>
Expand Down
4 changes: 4 additions & 0 deletions src/styles/utilities/sizing.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ export default {
mwn: {
maxWidth: 'auto',
},

w1: {
width: 4,
},
};