From 859b17602e446d9b77412890d85d2aff644adc32 Mon Sep 17 00:00:00 2001 From: Sadaqat Ali Date: Fri, 7 Jan 2022 11:10:11 +0500 Subject: [PATCH] fixed alignment issues in search result screen --- .../view/userListItem/userListItemStyles.js | 8 +++++--- .../screen/tabs/people/view/peopleResultsStyles.js | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/basicUIElements/view/userListItem/userListItemStyles.js b/src/components/basicUIElements/view/userListItem/userListItemStyles.js index 31c69f89d..ce0d24c38 100644 --- a/src/components/basicUIElements/view/userListItem/userListItemStyles.js +++ b/src/components/basicUIElements/view/userListItem/userListItemStyles.js @@ -1,4 +1,5 @@ import EStyleSheet from 'react-native-extended-stylesheet'; +import { isRTL } from '../../../../utils/I18nUtils'; export default EStyleSheet.create({ container: { @@ -8,16 +9,17 @@ export default EStyleSheet.create({ }, userDescription: { flexDirection: 'column', - alignItems: 'flex-start', + alignItems: isRTL() ? 'flex-end' : 'flex-start', flexGrow: 1, - marginLeft: 8, + marginLeft: isRTL() ? 0 : 8, + marginRight: isRTL() ? 8 : 0, }, voteItemWrapper: { alignItems: 'center', paddingHorizontal: 16, paddingVertical: 12, borderRadius: 8, - flexDirection: 'row', + flexDirection: isRTL() ? 'row-reverse' : 'row', backgroundColor: '$primaryBackgroundColor', }, voteItemWrapperGray: { diff --git a/src/screens/searchResult/screen/tabs/people/view/peopleResultsStyles.js b/src/screens/searchResult/screen/tabs/people/view/peopleResultsStyles.js index 8e20ee5a8..2dd3d9c15 100644 --- a/src/screens/searchResult/screen/tabs/people/view/peopleResultsStyles.js +++ b/src/screens/searchResult/screen/tabs/people/view/peopleResultsStyles.js @@ -1,4 +1,5 @@ import EStyleSheet from 'react-native-extended-stylesheet'; +import { isRTL } from '../../../../../../utils/I18nUtils'; export default EStyleSheet.create({ container: { @@ -48,6 +49,7 @@ export default EStyleSheet.create({ descriptionStyle: { maxWidth: '$deviceWidth', marginTop: 4, - marginRight: 24, + marginRight: isRTL() ? 0 : 24, + marginLeft: isRTL() ? 24 : 0, }, });