You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
@@ -61,6 +61,7 @@ import RotatingLogs from './RotatingLogs';
|
||||
import { NoteEntity } from './services/database/types';
|
||||
import { join } from 'path';
|
||||
import processStartFlags from './utils/processStartFlags';
|
||||
import { setupAutoDeletion } from './services/trash/permanentlyDeleteOldItems';
|
||||
import determineProfileAndBaseDir from './determineBaseAppDirs';
|
||||
|
||||
const appLogger: LoggerWrapper = Logger.create('App');
|
||||
@@ -438,6 +439,14 @@ export default class BaseApplication {
|
||||
doRefreshFolders = true;
|
||||
}
|
||||
|
||||
// If a note gets deleted to the trash or gets restored we refresh the folders so that the
|
||||
// note count can be updated.
|
||||
if (this.hasGui() && ['NOTE_UPDATE_ONE'].includes(action.type)) {
|
||||
if (action.changedFields && action.changedFields.includes('deleted_time')) {
|
||||
doRefreshFolders = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (action.type === 'HISTORY_BACKWARD' || action.type === 'HISTORY_FORWARD') {
|
||||
refreshNotes = true;
|
||||
refreshNotesUseSelectedNoteId = true;
|
||||
@@ -822,6 +831,8 @@ export default class BaseApplication {
|
||||
if (!currentFolder) currentFolder = await Folder.defaultFolder();
|
||||
Setting.setValue('activeFolderId', currentFolder ? currentFolder.id : '');
|
||||
|
||||
await setupAutoDeletion();
|
||||
|
||||
await MigrationService.instance().run();
|
||||
|
||||
return argv;
|
||||
|
||||
Reference in New Issue
Block a user