Skip to content

Commit 8ae36b0

Browse files
committed
Implement GDrive Save All without prior folder, fix instant rename to update playground PersistenceFile
1 parent 28285c9 commit 8ae36b0

File tree

3 files changed

+295
-181
lines changed

3 files changed

+295
-181
lines changed

src/commons/controlBar/ControlBarGoogleDriveButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const ControlBarGoogleDriveButtons: React.FC<Props> = props => {
7474
icon={IconNames.DOUBLE_CHEVRON_UP}
7575
onClick={props.onClickSaveAll}
7676
// disable if persistenceObject is not a folder
77-
isDisabled={props.currentObject ? props.currentObject.isFolder ? false : true : true}
77+
isDisabled={props.accessToken ? false : true}
7878
/>
7979
);
8080

src/commons/sagas/GitHubPersistenceSaga.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function* githubSaveAll(): any {
253253
}
254254

255255
function* githubCreateFile({ payload }: ReturnType<typeof actions.githubCreateFile>): any {
256-
yield call(store.dispatch, actions.disableFileSystemContextMenus());
256+
//yield call(store.dispatch, actions.disableFileSystemContextMenus());
257257

258258
const filePath = payload;
259259

@@ -298,7 +298,7 @@ function* githubCreateFile({ payload }: ReturnType<typeof actions.githubCreateFi
298298
}
299299

300300
function* githubDeleteFile({ payload }: ReturnType<typeof actions.githubDeleteFile>): any {
301-
yield call(store.dispatch, actions.disableFileSystemContextMenus());
301+
//yield call(store.dispatch, actions.disableFileSystemContextMenus());
302302

303303
const filePath = payload;
304304

@@ -337,7 +337,7 @@ function* githubDeleteFile({ payload }: ReturnType<typeof actions.githubDeleteFi
337337
}
338338

339339
function* githubDeleteFolder({ payload }: ReturnType<typeof actions.githubDeleteFolder>): any {
340-
yield call(store.dispatch, actions.disableFileSystemContextMenus());
340+
//yield call(store.dispatch, actions.disableFileSystemContextMenus());
341341

342342
const filePath = payload;
343343

@@ -375,7 +375,7 @@ function* githubDeleteFolder({ payload }: ReturnType<typeof actions.githubDelete
375375
}
376376

377377
function* githubRenameFile({ payload }: ReturnType<typeof actions.githubRenameFile>): any {
378-
yield call(store.dispatch, actions.disableFileSystemContextMenus());
378+
//yield call(store.dispatch, actions.disableFileSystemContextMenus());
379379

380380
const newFilePath = payload.newFilePath;
381381
const oldFilePath = payload.oldFilePath;
@@ -416,7 +416,7 @@ function* githubRenameFile({ payload }: ReturnType<typeof actions.githubRenameFi
416416
}
417417

418418
function* githubRenameFolder({ payload }: ReturnType<typeof actions.githubRenameFile>): any {
419-
yield call(store.dispatch, actions.disableFileSystemContextMenus());
419+
//yield call(store.dispatch, actions.disableFileSystemContextMenus());
420420

421421
const newFilePath = payload.newFilePath;
422422
const oldFilePath = payload.oldFilePath;

0 commit comments

Comments
 (0)