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 (
<ParallaxScrollView
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={
<ThemedText type='title' style={styles.headerTitle}>
@ -33,17 +33,17 @@ const styles = StyleSheet.create({
gap: 8,
marginBottom: 8,
},
reactLogo: {
techTrackerLogo: {
height: 70,
width: 72,
bottom: 10,
left: 40,
left: Platform.OS === 'ios' ? 40 : 20,
position: 'absolute',
},
headerTitle: {
position: 'absolute',
bottom: 20,
left: 75,
left: 80,
right: 0,
textAlign: 'center',
fontSize: 48,

View File

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

View File

@ -3,6 +3,7 @@ import {
StyleSheet,
Alert,
ActivityIndicator,
ScrollView,
} from 'react-native';
import { supabase } from '@/lib/supabase';
import { ThemedView, ThemedText, ThemedTextButton, ThemedTextInput } from '@/components/theme';
@ -107,53 +108,58 @@ const ProfileScreen = () => {
}
return (
<ScrollView
contentContainerStyle={styles.scrollContainer}
keyboardShouldPersistTaps='never'
>
<ThemedView style={styles.container}>
<ThemedView style={styles.avatarContainer}>
<ProfileAvatar
url={profile.avatar_url}
size={120}
onUpload={handleAvatarUpload}
disabled={updating}
<ThemedView style={styles.avatarContainer}>
<ProfileAvatar
url={profile.avatar_url}
size={120}
onUpload={handleAvatarUpload}
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 && (
<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'
<LogoutButton
fontSize={18}
fontWeight='semibold'
width='90%'
style={styles.logoutButton}
/>
</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>
</ScrollView>
);
};
export default ProfileScreen;

View File

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

View File

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