1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Desktop: Ask to start in safe mode when the application has crashed

This commit is contained in:
Laurent Cozic
2022-04-20 17:34:58 +01:00
parent bd917ae09c
commit d9a4a9cb30
13 changed files with 64 additions and 25 deletions

View File

@ -1,7 +1,7 @@
import { _ } from '@joplin/lib/locale';
import Setting from '@joplin/lib/models/Setting';
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
import bridge from '../services/bridge';
import restart from '../services/restart';
export const declaration: CommandDeclaration = {
name: 'toggleSafeMode',
@ -14,7 +14,7 @@ export const runtime = (): CommandRuntime => {
enabled = enabled !== null ? enabled : !Setting.value('isSafeMode');
Setting.setValue('isSafeMode', enabled);
await Setting.saveAll();
bridge().restart();
await restart();
},
};
};