Skip to content

Commit

Permalink
fix android inline send
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisnojima committed Jan 15, 2019
1 parent 649a19c commit c5be116
Show file tree
Hide file tree
Showing 4 changed files with 262 additions and 3 deletions.
3 changes: 2 additions & 1 deletion shared/common-adapters/icon.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const styles = NativeStyleSheet.create(fontSizes)
const Text = Styles.styled(NativeText)(
// static styles
{
color: Styles.globalColors.black_50,
color: Styles.globalColors.black_50, // MUST set this or it can be inherited from outside text
fontFamily: 'kb',
fontWeight: 'normal', // MUST set this or it can be inherited from outside text
},
// dynamic styles. check for undefined and send null
props =>
Expand Down
28 changes: 27 additions & 1 deletion shared/common-adapters/markdown/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as I from 'immutable'
import * as React from 'react'
import * as ChatConstants from '../../constants/chat2'
import * as Sb from '../../stories/storybook'
import HiddenString from '../../util/hidden-string'
import * as Kb from '../index'
import {escapePath} from '../../constants/fs'
import {stringToPath} from '../../constants/types/fs'
Expand Down Expand Up @@ -205,6 +206,19 @@ const mocksWithMeta = {
meta: mockMeta,
text: 'Hey! I *just* posted a video of my sick jump on #general',
},
'Inline send': {
meta: {
mentionsAt: I.Set(),
mentionsChannel: 'none',
mentionsChannelName: I.Map(),
message: ChatConstants.makeMessageText({
decoratedText: new HiddenString(
`$>kb\${"typ":0,"payment":{"username":"chrisnojima","paymentText":"+0.001XLM@chrisnojima","result":{"resultTyp":0,"sent":"63f55e57bf53402e54b587cd035f96fb7136d0c98b46d6926e41360000000000"}}}$<kb$`
),
}),
},
text: `$>kb\${"typ":0,"payment":{"username":"chrisnojima","paymentText":"+0.001XLM@chrisnojima","result":{"resultTyp":0,"sent":"63f55e57bf53402e54b587cd035f96fb7136d0c98b46d6926e41360000000000"}}}$<kb$`,
},
'User mention - Edge cases': {
meta: {
...mockMeta,
Expand Down Expand Up @@ -294,7 +308,19 @@ const randomGenerated = {
'Case 6': generateCase('case 6'),
}

export const provider = Sb.createPropProviderWithCommon({})
export const provider = Sb.createPropProviderWithCommon({
PaymentPopup: p => ({}),
PaymentStatus: p => ({
allowFontScaling: true,
allowPopup: false,
errorDetail: null,
isSendError: false,
message: p.message,
paymentID: '123',
status: 'completed',
text: 'tada',
}),
})

class ShowAST extends React.Component<{text: string, meta: ?MarkdownMeta}, {visible: boolean}> {
state = {visible: false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public List<NativeModule> createNativeModules(ReactApplicationContext reactAppli
new RNFetchBlobPackage(),
new ReactNativeContacts(),
new FastImageViewPackage(),
new ReactNativeContacts(),
new LottiePackage()
);
}
Expand Down
233 changes: 233 additions & 0 deletions shared/stories/__tests__/__snapshots__/Storyshots.test.js.snap

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

0 comments on commit c5be116

Please sign in to comment.