Skip to content

Commit

Permalink
Mobile: Fixes #11197: Fix search result note hidden after powering on…
Browse files Browse the repository at this point in the history
… device (#11297)
  • Loading branch information
personalizedrefrigerator authored Oct 31, 2024
1 parent 612d72d commit ddd1855
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/app-mobile/components/screens/Notes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ class NotesScreenComponent extends BaseScreenComponent<Props, State> {
});

if (source === props.notesSource) return;
// For now, search refresh is handled by the search screen.
if (props.notesParentType === 'Search') return;

let notes: NoteEntity[] = [];
if (props.notesParentType === 'Folder') {
Expand Down
6 changes: 6 additions & 0 deletions packages/app-mobile/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ const appReducer = (state = appDefaultState, action: any) => {

newState.selectedNoteHash = '';

if (action.routeName === 'Search') {
newState.notesParentType = 'Search';
}

if ('noteId' in action) {
newState.selectedNoteIds = action.noteId ? [action.noteId] : [];
}
Expand Down Expand Up @@ -344,6 +348,8 @@ const appReducer = (state = appDefaultState, action: any) => {

newState.route = action;
newState.historyCanGoBack = !!navHistory.length;

logger.debug('Navigated to route:', newState.route?.routeName, 'with notesParentType:', newState.notesParentType);
}
break;

Expand Down

0 comments on commit ddd1855

Please sign in to comment.