Start fixing simple Android issues

This commit is contained in:
Gabriel Brown 2025-03-13 12:33:48 -05:00
parent ca9b56c5f1
commit 67179593cb
5 changed files with 65 additions and 50 deletions

View File

@ -7,7 +7,7 @@ const HomeScreen = () => {
return ( return (
<ParallaxScrollView <ParallaxScrollView
headerImage={ headerImage={
<Image source={require('@/assets/images/tech_tracker_logo.png')} style={styles.reactLogo} /> <Image source={require('@/assets/images/tech_tracker_logo.png')} style={styles.techTrackerLogo} />
} }
headerTitle={ headerTitle={
<ThemedText type='title' style={styles.headerTitle}> <ThemedText type='title' style={styles.headerTitle}>
@ -33,17 +33,17 @@ const styles = StyleSheet.create({
gap: 8, gap: 8,
marginBottom: 8, marginBottom: 8,
}, },
reactLogo: { techTrackerLogo: {
height: 70, height: 70,
width: 72, width: 72,
bottom: 10, bottom: 10,
left: 40, left: Platform.OS === 'ios' ? 40 : 20,
position: 'absolute', position: 'absolute',
}, },
headerTitle: { headerTitle: {
position: 'absolute', position: 'absolute',
bottom: 20, bottom: 20,
left: 75, left: 80,
right: 0, right: 0,
textAlign: 'center', textAlign: 'center',
fontSize: 48, fontSize: 48,

View File

@ -3,8 +3,11 @@ import { useRouter } from 'expo-router';
import ParallaxScrollView from '@/components/default/ParallaxScrollView'; import ParallaxScrollView from '@/components/default/ParallaxScrollView';
import { ThemedText, ThemedTextButton, ThemedView } from '@/components/theme'; import { ThemedText, ThemedTextButton, ThemedView } from '@/components/theme';
import { IconSymbol } from '@/components/ui/IconSymbol'; import { IconSymbol } from '@/components/ui/IconSymbol';
import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
const SettingsScreen = () => { const SettingsScreen = () => {
const scheme = useColorScheme() ?? 'dark';
const router = useRouter(); const router = useRouter();
return ( return (
@ -20,7 +23,7 @@ const SettingsScreen = () => {
> >
<ThemedView style={styles.section}> <ThemedView style={styles.section}>
<TouchableOpacity <TouchableOpacity
style={styles.settingItem} style={[styles.settingItem, {backgroundColor: Colors[scheme].card}]}
onPress={() => router.push('/settings/profile')} onPress={() => router.push('/settings/profile')}
> >
<IconSymbol name="person.fill" size={24} color="#007AFF" style={styles.icon} /> <IconSymbol name="person.fill" size={24} color="#007AFF" style={styles.icon} />
@ -67,7 +70,6 @@ const styles = StyleSheet.create({
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
padding: 16, padding: 16,
backgroundColor: 'rgba(200, 200, 200, 0.1)',
marginBottom: 1, marginBottom: 1,
}, },
icon: { icon: {

View File

@ -3,6 +3,7 @@ import {
StyleSheet, StyleSheet,
Alert, Alert,
ActivityIndicator, ActivityIndicator,
ScrollView,
} from 'react-native'; } from 'react-native';
import { supabase } from '@/lib/supabase'; import { supabase } from '@/lib/supabase';
import { ThemedView, ThemedText, ThemedTextButton, ThemedTextInput } from '@/components/theme'; import { ThemedView, ThemedText, ThemedTextButton, ThemedTextInput } from '@/components/theme';
@ -107,53 +108,58 @@ const ProfileScreen = () => {
} }
return ( return (
<ScrollView
contentContainerStyle={styles.scrollContainer}
keyboardShouldPersistTaps='never'
>
<ThemedView style={styles.container}> <ThemedView style={styles.container}>
<ThemedView style={styles.avatarContainer}> <ThemedView style={styles.avatarContainer}>
<ProfileAvatar <ProfileAvatar
url={profile.avatar_url} url={profile.avatar_url}
size={120} size={120}
onUpload={handleAvatarUpload} onUpload={handleAvatarUpload}
disabled={updating} disabled={updating}
/>
</ThemedView>
{profile.provider && (
<ThemedText style={styles.providerText}>
Signed in with {profile.provider.charAt(0).toUpperCase() + profile.provider.slice(1)}
</ThemedText>
)}
<ThemedView style={styles.formSection}>
<ThemedText type='title' style={styles.label}>Name</ThemedText>
<ThemedTextInput
value={profile.full_name}
onChangeText={(text) => setProfile(prev => ({ ...prev, full_name: text }))}
placeholder="Enter your full name"
style={styles.input}
editable={!updating}
autoCapitalize='words'
textContentType='name'
maxLength={50}
returnKeyType='done'
/>
</ThemedView>
<ThemedTextButton
text={updating ? 'Saving...' : 'Save Changes'}
onPress={updateProfile}
disabled={updating || !profile.full_name.trim()}
fontSize={18}
fontWeight='semibold'
width='90%'
style={styles.saveButton}
/> />
</ThemedView>
{profile.provider && ( <LogoutButton
<ThemedText style={styles.providerText}> fontSize={18}
Signed in with {profile.provider.charAt(0).toUpperCase() + profile.provider.slice(1)} fontWeight='semibold'
</ThemedText> width='90%'
)} style={styles.logoutButton}
<ThemedView style={styles.formSection}>
<ThemedText type='title' style={styles.label}>Name</ThemedText>
<ThemedTextInput
value={profile.full_name}
onChangeText={(text) => setProfile(prev => ({ ...prev, full_name: text }))}
placeholder="Enter your full name"
style={styles.input}
editable={!updating}
autoCapitalize='words'
textContentType='name'
maxLength={50}
returnKeyType='done'
/> />
</ThemedView>
<ThemedTextButton
text={updating ? 'Saving...' : 'Save Changes'}
onPress={updateProfile}
disabled={updating || !profile.full_name.trim()}
fontSize={18}
fontWeight='semibold'
width='90%'
style={styles.saveButton}
/>
<LogoutButton
fontSize={18}
fontWeight='semibold'
width='90%'
style={styles.logoutButton}
/>
</ThemedView> </ThemedView>
</ScrollView>
); );
}; };
export default ProfileScreen; export default ProfileScreen;

View File

@ -20,8 +20,12 @@ import { RealtimeChannel } from '@supabase/supabase-js';
import { UserStatus } from '@/constants/Types'; import { UserStatus } from '@/constants/Types';
import debounce from 'lodash/debounce'; import debounce from 'lodash/debounce';
import NetInfo from '@react-native-community/netinfo'; import NetInfo from '@react-native-community/netinfo';
import { Colors } from '@/constants/Colors';
import { useColorScheme } from '@/hooks/useColorScheme';
const StatusList = () => { const StatusList = () => {
const scheme = useColorScheme() ?? 'dark';
const [statuses, setStatuses] = useState<UserStatus[]>([]); const [statuses, setStatuses] = useState<UserStatus[]>([]);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [refreshing, setRefreshing] = useState(false); const [refreshing, setRefreshing] = useState(false);
@ -357,6 +361,7 @@ const StatusList = () => {
style={[ style={[
styles.statusItem, styles.statusItem,
recentlyUpdatedIds.has(item.id) && styles.recentlyUpdated, recentlyUpdatedIds.has(item.id) && styles.recentlyUpdated,
{backgroundColor: Colors[scheme].card},
]} ]}
onPress={() => handleUserSelect(item)} onPress={() => handleUserSelect(item)}
activeOpacity={0.7} activeOpacity={0.7}
@ -469,7 +474,6 @@ const styles = StyleSheet.create({
}, },
statusItem: { statusItem: {
flexDirection: 'row', flexDirection: 'row',
backgroundColor: 'rgba(200, 200, 200, 0.1)',
padding: 16, padding: 16,
borderRadius: 12, borderRadius: 12,
marginHorizontal: 16, marginHorizontal: 16,

View File

@ -13,6 +13,9 @@ const MAPPING = {
'paperplane.fill': 'send', 'paperplane.fill': 'send',
'chevron.left.forwardslash.chevron.right': 'code', 'chevron.left.forwardslash.chevron.right': 'code',
'chevron.right': 'chevron-right', 'chevron.right': 'chevron-right',
'gear.circle' : 'settings',
'gearshape.fill' : 'settings',
'person.fill' : 'person'
} as Partial< } as Partial<
Record< Record<
import('expo-symbols').SymbolViewProps['name'], import('expo-symbols').SymbolViewProps['name'],