mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
This commit is contained in:
parent
bf634270be
commit
8cf4ef88b5
@ -11,11 +11,14 @@ import { FolderEntity, NoteEntity } from './services/database/types';
|
||||
import { getListRendererIds } from './services/noteList/renderers';
|
||||
import { ProcessResultsRow } from './services/search/SearchEngine';
|
||||
import { getDisplayParentId } from './services/trash';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
const fastDeepEqual = require('fast-deep-equal');
|
||||
const { ALL_NOTES_FILTER_ID } = require('./reserved-ids');
|
||||
const { createSelectorCreator, defaultMemoize } = require('reselect');
|
||||
const { createCachedSelector } = require('re-reselect');
|
||||
|
||||
const logger = Logger.create('lib/reducer');
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const additionalReducers: any[] = [];
|
||||
|
||||
@ -1045,7 +1048,11 @@ const reducer = produce((draft: Draft<State> = defaultState, action: any) => {
|
||||
case 'NOTE_SORT':
|
||||
|
||||
{
|
||||
draft.notes = Note.sortNotes(draft.notes, stateUtils.notesOrder(draft.settings), draft.settings.uncompletedTodosOnTop);
|
||||
if (draft.notesParentType === 'Search') {
|
||||
logger.debug('Not sorting the note list -- sorting should be done by search.');
|
||||
} else {
|
||||
draft.notes = Note.sortNotes(draft.notes, stateUtils.notesOrder(draft.settings), draft.settings.uncompletedTodosOnTop);
|
||||
}
|
||||
draft.noteListLastSortTime = Date.now();
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user