Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 93715bd

Browse files
author
KoalaSat
authored
New UI performance improvements (#141)
2 parents e7531ed + c036fd5 commit 93715bd

7 files changed

Lines changed: 27 additions & 18 deletions

File tree

frontend/Components/LnPayment/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ export const LnPayment: React.FC<TextContentProps> = ({ open, setOpen, event, us
8383
<RBSheet
8484
ref={bottomSheetLnPaymentRef}
8585
closeOnDragDown={true}
86-
height={330}
86+
height={380}
8787
customStyles={rbSheetCustomStyles}
8888
onClose={() => setOpen(false)}
8989
>
90-
<View>
90+
<View style={styles.drawerBottom}>
9191
<View style={styles.montoSelection}>
9292
<Button style={styles.montoButton} mode='outlined' onPress={() => setMonto('1000')}>
9393
<>
@@ -175,6 +175,10 @@ export const LnPayment: React.FC<TextContentProps> = ({ open, setOpen, event, us
175175
}
176176

177177
const styles = StyleSheet.create({
178+
drawerBottom: {
179+
height: '90%',
180+
justifyContent: 'space-between'
181+
},
178182
qrContainer: {
179183
flex: 1,
180184
justifyContent: 'center',

frontend/Pages/ContactsFeed/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ const styles = StyleSheet.create({
435435
},
436436
blank: {
437437
justifyContent: 'space-between',
438-
height: 232,
438+
height: 252,
439439
marginTop: 5,
440440
padding: 16,
441441
},

frontend/Pages/ConversationsFeed/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,10 @@ const styles = StyleSheet.create({
351351
},
352352
blank: {
353353
justifyContent: 'space-between',
354-
height: 200,
355-
marginTop: 60,
354+
height: 220,
355+
marginTop: 91,
356+
paddingLeft: 16,
357+
paddingRight: 16,
356358
},
357359
})
358360

frontend/Pages/HomeFeed/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ import { FlatList } from 'react-native-gesture-handler'
2929
import { getLastReaction } from '../../Functions/DatabaseFunctions/Reactions'
3030

3131
interface HomeFeedProps {
32-
jumpTo: (tabName: string) => void
32+
navigation: any
3333
}
3434

35-
export const HomeFeed: React.FC<HomeFeedProps> = ({ jumpTo }) => {
35+
export const HomeFeed: React.FC<HomeFeedProps> = ({ navigation }) => {
3636
const theme = useTheme()
3737
const { database } = useContext(AppContext)
3838
const { publicKey } = useContext(UserContext)
@@ -90,7 +90,7 @@ export const HomeFeed: React.FC<HomeFeedProps> = ({ jumpTo }) => {
9090
authors,
9191
}
9292
if (lastNote && lastNotes.length >= pageSize && !past) {
93-
message.since = lastNote.created_at
93+
message.since = lastNote?.created_at
9494
} else {
9595
message.limit = pageSize + initialPageSize
9696
}
@@ -99,7 +99,7 @@ export const HomeFeed: React.FC<HomeFeedProps> = ({ jumpTo }) => {
9999
{
100100
kinds: [EventKind.petNames],
101101
authors: users.filter((user) => user.name !== undefined).map((user) => user.id),
102-
since: users[0].created_at ?? 0,
102+
since: users[0]?.created_at ?? 0,
103103
},
104104
])
105105
setRefreshing(false)
@@ -190,7 +190,7 @@ export const HomeFeed: React.FC<HomeFeedProps> = ({ jumpTo }) => {
190190
<Text variant='bodyMedium' style={styles.center}>
191191
{t('homeFeed.emptyDescription')}
192192
</Text>
193-
<Button mode='contained' compact onPress={() => jumpTo('contacts')}>
193+
<Button mode='contained' compact onPress={() => navigation.jumpTo('contacts')}>
194194
{t('homeFeed.emptyButton')}
195195
</Button>
196196
</View>
@@ -235,8 +235,8 @@ const styles = StyleSheet.create({
235235
},
236236
blank: {
237237
justifyContent: 'space-between',
238-
height: 200,
239-
marginTop: 60,
238+
height: 220,
239+
marginTop: 91,
240240
},
241241
})
242242

frontend/Pages/NostrosDrawerNavigator/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const NostrosDrawerNavigator: React.FC = () => {
3232

3333
return userState !== 'loading' ? (
3434
<DrawerNavigator.Navigator
35-
drawerContent={({ navigation }) => <MenuItems navigation={navigation} />}
35+
drawerContent={() => <MenuItems />}
3636
screenOptions={{
3737
drawerStyle: {
3838
borderRadius: 28,

frontend/Pages/NotePage/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export const NotePage: React.FC<NotePageProps> = ({ route }) => {
144144

145145
const renderItem: (note: Note) => JSX.Element = (note) => (
146146
<View style={[styles.noteCard, { borderColor: theme.colors.onSecondary }]} key={note.id}>
147+
<View style={styles.noteCardSpace}></View>
147148
<NoteCard
148149
note={note}
149150
onPressOptions={() => {
@@ -322,10 +323,12 @@ const styles = StyleSheet.create({
322323
justifyContent: 'flex-start',
323324
},
324325
list: {
325-
padding: 16,
326+
paddingLeft: 16,
327+
paddingRight: 16,
326328
},
327329
loading: {
328-
paddingBottom: 60,
330+
paddingTop: 30,
331+
paddingBottom: 30,
329332
},
330333
fabSend: {
331334
right: 16,
@@ -338,7 +341,7 @@ const styles = StyleSheet.create({
338341
noteCard: {
339342
borderLeftWidth: 1,
340343
paddingLeft: 32,
341-
paddingBottom: 16,
344+
paddingTop: 16
342345
},
343346
})
344347

frontend/Pages/NotificationsFeed/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ const styles = StyleSheet.create({
211211
},
212212
blank: {
213213
justifyContent: 'space-between',
214-
height: 200,
215-
marginTop: 60,
214+
height: 220,
215+
marginTop: 91,
216216
},
217217
})
218218

0 commit comments

Comments
 (0)