Skip to content

Commit ded3ad9

Browse files
committed
fix(mobile): reload attachments when returning to view screen
1 parent 2dad747 commit ded3ad9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

apps/mobile/v1/src/screens/ViewNote/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,13 @@ export default function ViewNoteScreen() {
234234
if (scrollViewRef.current) {
235235
scrollViewRef.current.scrollTo({ y: 0, animated: false });
236236
}
237-
// Don't reload attachments on refocus - they're already loaded
237+
// Reload attachments on focus to catch any uploads from EditNote
238+
if (noteId && isOnline) {
239+
lastLoadedNoteId.current = null; // Force reload
240+
loadAttachments();
241+
}
238242
// eslint-disable-next-line react-hooks/exhaustive-deps
239-
}, [scrollY, noteId])
243+
}, [scrollY, noteId, isOnline])
240244
);
241245

242246
const handleRefresh = async () => {

0 commit comments

Comments
 (0)