Inline
This commit is contained in:
parent
f9560ec533
commit
881a963fde
1 changed files with 2 additions and 9 deletions
|
@ -77,14 +77,6 @@ export default function ExportModal(props: Props) {
|
|||
void syncExportRecord(exportFolder);
|
||||
}, [props.show]);
|
||||
|
||||
// =============
|
||||
// STATE UPDATERS
|
||||
// ==============
|
||||
const updateExportFolder = (newFolder: string) => {
|
||||
exportService.updateExportSettings({ folder: newFolder });
|
||||
setExportFolder(newFolder);
|
||||
};
|
||||
|
||||
// ======================
|
||||
// HELPER FUNCTIONS
|
||||
// =======================
|
||||
|
@ -128,7 +120,8 @@ export default function ExportModal(props: Props) {
|
|||
try {
|
||||
const newFolder = await exportService.changeExportDirectory();
|
||||
log.info(`Export folder changed to ${newFolder}`);
|
||||
updateExportFolder(newFolder);
|
||||
exportService.updateExportSettings({ folder: newFolder });
|
||||
setExportFolder(newFolder);
|
||||
void syncExportRecord(newFolder);
|
||||
} catch (e) {
|
||||
if (e.message !== CustomError.SELECT_FOLDER_ABORTED) {
|
||||
|
|
Loading…
Reference in a new issue