From 70f4debc0b27cc5245cceaede2a50ec03c1d67d5 Mon Sep 17 00:00:00 2001 From: João Ferreiro Date: Wed, 14 Dec 2022 17:53:26 +0000 Subject: initial android fixes --- src/view/com/composer/ComposePost.tsx | 7 +++++-- src/view/com/modals/ServerInput.tsx | 15 +++++++++++++-- src/view/com/posts/FeedItem.tsx | 1 + src/view/com/profile/ProfileHeader.tsx | 14 +++++++------- src/view/com/util/PostMeta.tsx | 4 ++-- src/view/com/util/RichText.tsx | 6 +++--- src/view/com/util/ViewHeader.tsx | 7 ++++++- src/view/shell/mobile/Composer.tsx | 8 ++++++-- 8 files changed, 43 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/view/com/composer/ComposePost.tsx b/src/view/com/composer/ComposePost.tsx index 6248e136e..03c7af32f 100644 --- a/src/view/com/composer/ComposePost.tsx +++ b/src/view/com/composer/ComposePost.tsx @@ -3,6 +3,7 @@ import {observer} from 'mobx-react-lite' import { ActivityIndicator, KeyboardAvoidingView, + Platform, SafeAreaView, ScrollView, StyleSheet, @@ -175,7 +176,9 @@ export const ComposePost = observer(function ComposePost({ }, [text]) return ( - + @@ -345,7 +348,6 @@ const styles = StyleSheet.create({ topbar: { flexDirection: 'row', alignItems: 'center', - paddingTop: 10, paddingBottom: 10, paddingHorizontal: 5, height: 55, @@ -398,6 +400,7 @@ const styles = StyleSheet.create({ padding: 5, fontSize: 18, marginLeft: 8, + alignSelf: 'flex-start', }, replyToLayout: { flexDirection: 'row', diff --git a/src/view/com/modals/ServerInput.tsx b/src/view/com/modals/ServerInput.tsx index c885ff164..15632ba39 100644 --- a/src/view/com/modals/ServerInput.tsx +++ b/src/view/com/modals/ServerInput.tsx @@ -1,5 +1,5 @@ import React, {useState} from 'react' -import {StyleSheet, Text, TextInput, TouchableOpacity, View} from 'react-native' +import {Platform, StyleSheet, Text, TouchableOpacity, View} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {BottomSheetScrollView, BottomSheetTextInput} from '@gorhom/bottom-sheet' import {useStores} from '../../../state' @@ -76,7 +76,7 @@ export function Component({ onPress={() => doSelect(customUrl)}> @@ -133,4 +133,15 @@ const styles = StyleSheet.create({ fontWeight: '500', color: colors.white, }, + checkIcon: { + position: 'relative', + ...Platform.select({ + android: { + top: 8, + }, + ios: { + top: 2, + }, + }), + }, }) diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index db7b757cc..48be582dc 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -331,6 +331,7 @@ const styles = StyleSheet.create({ fontFamily: 'System', fontSize: 16, lineHeight: 20.8, // 1.3 of 16px + color: colors.black, }, postEmbeds: { marginBottom: 10, diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index de9ae1dd2..e35f40cdf 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -168,7 +168,7 @@ export const ProfileHeader = observer(function ProfileHeader({ - Edit Profile + Edit Profile ) : ( <> @@ -177,7 +177,7 @@ export const ProfileHeader = observer(function ProfileHeader({ onPress={onPressToggleFollow} style={[styles.btn, styles.mainBtn]}> - Following + Following ) : ( @@ -202,7 +202,7 @@ export const ProfileHeader = observer(function ProfileHeader({ ) : undefined} - + {view.displayName || view.handle} @@ -218,7 +218,7 @@ export const ProfileHeader = observer(function ProfileHeader({ - + {view.followersCount} @@ -229,7 +229,7 @@ export const ProfileHeader = observer(function ProfileHeader({ - + {view.followsCount} following @@ -239,7 +239,7 @@ export const ProfileHeader = observer(function ProfileHeader({ - + {view.membersCount} @@ -248,7 +248,7 @@ export const ProfileHeader = observer(function ProfileHeader({ ) : undefined} - + {view.postsCount} diff --git a/src/view/com/util/PostMeta.tsx b/src/view/com/util/PostMeta.tsx index 1994580c1..6d94c7719 100644 --- a/src/view/com/util/PostMeta.tsx +++ b/src/view/com/util/PostMeta.tsx @@ -25,9 +25,9 @@ export function PostMeta(opts: PostMetaOpts) { style={styles.metaItem} href={opts.authorHref} title={opts.authorHandle}> - + {opts.authorDisplayName || opts.authorHandle} - +  {opts.authorHandle} diff --git a/src/view/com/util/RichText.tsx b/src/view/com/util/RichText.tsx index 66b0e2536..1f6d9cbcd 100644 --- a/src/view/com/util/RichText.tsx +++ b/src/view/com/util/RichText.tsx @@ -28,9 +28,9 @@ export function RichText({ fontSize: 26, lineHeight: 30, } - return {text} + return {text} } - return {text} + return {text} } if (!style) style = [] else if (!Array.isArray(style)) style = [style] @@ -65,7 +65,7 @@ export function RichText({ key++ } return ( - + {els} ) diff --git a/src/view/com/util/ViewHeader.tsx b/src/view/com/util/ViewHeader.tsx index 9b029ab10..141d2dd50 100644 --- a/src/view/com/util/ViewHeader.tsx +++ b/src/view/com/util/ViewHeader.tsx @@ -56,7 +56,11 @@ export const ViewHeader = observer(function ViewHeader({ hitSlop={BACK_HITSLOP} style={canGoBack ? styles.backIcon : styles.backIconWide}> {canGoBack ? ( - + ) : (