Skip to content

Commit

Permalink
fix(rn): bas64
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Sep 21, 2018
1 parent da246e1 commit 732274a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
Expand Up @@ -12,29 +12,19 @@ import {
} from '../../../../styles'
import { mutations } from '../../../../graphql'
import createTabNavigator from 'react-navigation-deprecated-tab-navigator/src/createTabNavigator'
import { btoa } from 'b64-lite'

class TextInputMultilineFix extends PureComponent {
state = {
multiline: true,
multiline: false,
}

componentDidMount () {
this.setState({ multiline: this.props.multiline })
}

render () {
return (
<TextInputNative
onFocus={() =>
this.setState({ multiline: false }, () =>
this.setState({ multiline: true })
)
}
onBlur={() =>
this.setState({ multiline: false }, () =>
this.setState({ multiline: true })
)
}
multiline={this.state.multiline}
{...this.props}
/>
)
return <TextInputNative {...this.props} multiline={this.state.multiline} />
}
}

Expand Down Expand Up @@ -68,6 +58,7 @@ class ByPublicKey extends PureComponent {
marginTop,
rounded,
]}
multiline
placeholder='Type or copy/paste a berty user public key here'
value={routeName === 'Enter a public key' ? contactID : myID}
onChangeText={
Expand Down
1 change: 1 addition & 0 deletions client/react-native/package.json
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.1",
"description": "Berty's react native",
"dependencies": {
"b64-lite": "^1.3.1",
"graphql": "^0.13.2",
"graphql-relay": "^0.5.5",
"isomorphic-fetch": "^2.2.1",
Expand Down
10 changes: 10 additions & 0 deletions client/react-native/yarn.lock
Expand Up @@ -834,6 +834,12 @@ axobject-query@^2.0.1:
dependencies:
ast-types-flow "0.0.7"

b64-lite@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/b64-lite/-/b64-lite-1.3.1.tgz#708430847ceb458148c4461ae633d6e15f53b360"
dependencies:
base-64 "^0.1.0"

babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
Expand Down Expand Up @@ -1757,6 +1763,10 @@ balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"

base-64@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb"

base64-js@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-0.0.8.tgz#1101e9544f4a76b1bc3b26d452ca96d7a35e7978"
Expand Down

0 comments on commit 732274a

Please sign in to comment.