From 162808b49816bcf7e20ea4ff287a6dd71e8898ca Mon Sep 17 00:00:00 2001 From: feruz Date: Tue, 28 Jan 2020 14:50:20 +0200 Subject: [PATCH 1/7] enable back hermes --- android/app/build.gradle | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 98d709c5f..e81d96e73 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -79,7 +79,7 @@ import com.android.build.OutputFile project.ext.react = [ entryFile: "index.js", - enableHermes: false, // clean and rebuild if changing + enableHermes: true, // clean and rebuild if changing ] apply from: "../../node_modules/react-native/react.gradle" @@ -148,8 +148,13 @@ android { multiDexEnabled true // react-native-image-crop-picker vectorDrawables.useSupportLibrary = true + ndk { + abiFilters "armeabi-v7a",'x86',"arm64-v8a",'x86_64' + } + } + dexOptions { + javaMaxHeapSize "4g" } - splits { abi { reset() @@ -194,6 +199,10 @@ android { } packagingOptions { + exclude '**/libjscexecutor.so' + exclude '**/libhermes-inspector.so' + exclude '**/libhermes-executor-debug.so' + pickFirst '**/armeabi-v7a/libc++_shared.so' pickFirst '**/x86/libc++_shared.so' pickFirst '**/arm64-v8a/libc++_shared.so' From d0833842408b918fdc74d272587ecb59623d9efa Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 29 Jan 2020 04:33:00 +0200 Subject: [PATCH 2/7] fix startup issue android back button --- .../application/container/applicationContainer.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js index 4d430c381..d50c1e59d 100644 --- a/src/screens/application/container/applicationContainer.js +++ b/src/screens/application/container/applicationContainer.js @@ -82,7 +82,7 @@ export const setPreviousAppState = () => { const appStateTimeout = setTimeout(() => { previousAppState = AppState.currentState; clearTimeout(appStateTimeout); - }, 2000); + }, 500); }; class ApplicationContainer extends Component { @@ -138,7 +138,6 @@ class ApplicationContainer extends Component { if (!isIos) BackHandler.removeEventListener('hardwareBackPress', this._onBackPress); // NetInfo.isConnected.removeEventListener('connectionChange', this._handleConntectionChange); - //clearInterval(this.globalInterval); Linking.removeEventListener('url', this._handleOpenURL); @@ -156,11 +155,9 @@ class ApplicationContainer extends Component { const { isConnected, dispatch } = this.props; if (state.isConnected !== isConnected) { dispatch(setConnectivityStatus(state.isConnected)); - this._fetchApp(); - /*if (!state.isConnected) { - clearInterval(this.globalInterval); - }*/ + //this._fetchApp(); } + this._fetchApp(); }); }; @@ -217,7 +214,6 @@ class ApplicationContainer extends Component { _handleAppStateChange = nextAppState => { const { appState } = this.state; const { isPinCodeOpen: _isPinCodeOpen } = this.props; - getExistUser().then(isExistUser => { if (isExistUser) { if (appState.match(/active|forground/) && nextAppState === 'inactive') { @@ -257,7 +253,6 @@ class ApplicationContainer extends Component { const { isConnected } = this.props; if (isConnected && userRealmObject) { await this._fetchUserDataFromDsteem(userRealmObject); - //this.globalInterval = setInterval(this._refreshGlobalProps, 180000); } }; @@ -617,7 +612,6 @@ class ApplicationContainer extends Component { if (isConnected !== null && isConnected !== nextProps.isConnected && nextProps.isConnected) { this._fetchApp(); - //this.globalInterval = setInterval(this._refreshGlobalProps, 180000); } } From 2b2c7f4451fc45970dd5540067c7eb188955278c Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 29 Jan 2020 04:41:30 +0200 Subject: [PATCH 3/7] fix popover height, beneficiary fit --- src/components/upvote/view/upvoteStyles.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/upvote/view/upvoteStyles.js b/src/components/upvote/view/upvoteStyles.js index e68266928..0bc6b23e8 100644 --- a/src/components/upvote/view/upvoteStyles.js +++ b/src/components/upvote/view/upvoteStyles.js @@ -23,7 +23,7 @@ export default EStyleSheet.create({ }, popoverDetails: { flexDirection: 'row', - height: 100, + height: 'auto', borderRadius: 20, paddingHorizontal: 26, backgroundColor: '$primaryBackgroundColor', @@ -72,9 +72,7 @@ export default EStyleSheet.create({ hideArrow: { borderTopColor: 'transparent', }, - overlay: { - backgroundColor: '#403c4449', - }, + overlay: {}, payoutValue: { alignSelf: 'center', fontSize: 10, From c7005eb6b185257e597d893cdad2b97b9327d378 Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 29 Jan 2020 05:37:49 +0200 Subject: [PATCH 4/7] remove comments bottom margin --- src/components/comments/view/commentStyles.js | 2 +- src/components/popoverWrapper/popoverWrapperStyles.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/comments/view/commentStyles.js b/src/components/comments/view/commentStyles.js index ac9ba63d8..7a406e4fc 100644 --- a/src/components/comments/view/commentStyles.js +++ b/src/components/comments/view/commentStyles.js @@ -2,7 +2,7 @@ import EStyleSheet from 'react-native-extended-stylesheet'; export default EStyleSheet.create({ list: { - marginBottom: 20, + marginBottom: 0, }, moreRepliesButtonWrapper: { backgroundColor: '$iconColor', diff --git a/src/components/popoverWrapper/popoverWrapperStyles.js b/src/components/popoverWrapper/popoverWrapperStyles.js index 6c775cdf6..0b93eaa80 100644 --- a/src/components/popoverWrapper/popoverWrapperStyles.js +++ b/src/components/popoverWrapper/popoverWrapperStyles.js @@ -18,9 +18,7 @@ export default EStyleSheet.create({ justifyContent: 'space-between', alignItems: 'center', }, - overlay: { - backgroundColor: '#403c4449', - }, + overlay: {}, popoverText: { color: '$primaryDarkText', }, From 6b3a5fc4b4ad49690c7fc0d29551055ad813d391 Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 29 Jan 2020 06:56:33 +0200 Subject: [PATCH 5/7] header style align tags --- .../view/postHeaderDescription.js | 14 ++++++++------ .../view/postHeaderDescriptionStyles.js | 7 ++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/components/postElements/headerDescription/view/postHeaderDescription.js b/src/components/postElements/headerDescription/view/postHeaderDescription.js index 7f2be15ad..21c6b7c48 100644 --- a/src/components/postElements/headerDescription/view/postHeaderDescription.js +++ b/src/components/postElements/headerDescription/view/postHeaderDescription.js @@ -70,7 +70,7 @@ class PostHeaderDescription extends PureComponent { /> )} - + {name} {_reputationText} - {!!tag && ( - tagOnPress && tagOnPress()}> - - - )} {isShowOwnerIndicator && ( )} @@ -94,6 +89,13 @@ class PostHeaderDescription extends PureComponent { + + {!!tag && ( + tagOnPress && tagOnPress()}> + + + )} + ); diff --git a/src/components/postElements/headerDescription/view/postHeaderDescriptionStyles.js b/src/components/postElements/headerDescription/view/postHeaderDescriptionStyles.js index e537bfa66..253971fb9 100644 --- a/src/components/postElements/headerDescription/view/postHeaderDescriptionStyles.js +++ b/src/components/postElements/headerDescription/view/postHeaderDescriptionStyles.js @@ -5,7 +5,7 @@ export default EStyleSheet.create({ flexDirection: 'row', alignItems: 'center', }, - details: { + leftContainer: { flexDirection: 'column', }, primaryDetails: { @@ -15,6 +15,11 @@ export default EStyleSheet.create({ flexDirection: 'row', marginHorizontal: 3, }, + rightContainer: { + flexDirection: 'column', + marginLeft: 'auto', + paddingLeft: 20, + }, avatar: { borderColor: '$borderColor', borderWidth: 1, From 7b5a7cbe7df8551d781c53c1156d403759566b3e Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 29 Jan 2020 07:06:10 +0200 Subject: [PATCH 6/7] remove empty tag before submit --- src/screens/editor/container/editorContainer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/screens/editor/container/editorContainer.js b/src/screens/editor/container/editorContainer.js index a58c6112e..9c9db7eaf 100644 --- a/src/screens/editor/container/editorContainer.js +++ b/src/screens/editor/container/editorContainer.js @@ -234,7 +234,9 @@ class EditorContainer extends Component { this.setState({ isPostSending: true }); const meta = extractMetadata(fields.body); - const jsonMeta = makeJsonMetadata(meta, fields.tags); + const _tags = fields.tags.filter(tag => tag && tag !== ' '); + + const jsonMeta = makeJsonMetadata(meta, _tags); // TODO: check if permlink is available github: #314 https://github.com/esteemapp/esteem-mobile/pull/314 let permlink = generatePermlink(fields.title); @@ -251,7 +253,7 @@ class EditorContainer extends Component { const author = currentAccount.name; const options = makeOptions(author, permlink); - const parentPermlink = fields.tags[0] || 'hive-125125'; + const parentPermlink = _tags[0] || 'hive-125125'; if (scheduleDate) { await this._setScheduledPost({ From 444d392b88afdf6b6f634ef0df6cd1445df94d29 Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 29 Jan 2020 07:11:41 +0200 Subject: [PATCH 7/7] community change --- src/utils/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/editor.js b/src/utils/editor.js index dffbc3686..4e64d59b9 100644 --- a/src/utils/editor.js +++ b/src/utils/editor.js @@ -96,7 +96,7 @@ export const makeJsonMetadataReply = tags => ({ tags, app: `esteem/${VersionNumber.appVersion}-mobile`, format: 'markdown+html', - community: 'esteem.app', + community: 'hive-125125', }); export const makeJsonMetadata = (meta, tags) => @@ -104,7 +104,7 @@ export const makeJsonMetadata = (meta, tags) => tags, app: `esteem/${VersionNumber.appVersion}-mobile`, format: 'markdown+html', - community: 'esteem.app', + community: 'hive-125125', }); export const makeJsonMetadataForUpdate = (oldJson, meta, tags) => {