mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-12 04:12:30 +00:00
Stop repeating cancelled scheduled Fetch
This commit is contained in:
@@ -150,7 +150,7 @@ export function createFetchAllFlagHandler(
|
|||||||
// Select the remote database if there are multiple remotes configured.
|
// Select the remote database if there are multiple remotes configured.
|
||||||
const isRemoteActivated = await askAndActivateRemoteDatabase(host, log);
|
const isRemoteActivated = await askAndActivateRemoteDatabase(host, log);
|
||||||
if (!isRemoteActivated) {
|
if (!isRemoteActivated) {
|
||||||
return false;
|
return await cancelScheduledInitialisation(host, cleanupFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask user for use Fast Setup
|
// Ask user for use Fast Setup
|
||||||
|
|||||||
@@ -581,6 +581,16 @@ describe("Red Flag Feature", () => {
|
|||||||
|
|
||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
expect(host.mocks.ui.confirm.confirmWithMessage).not.toHaveBeenCalled();
|
expect(host.mocks.ui.confirm.confirmWithMessage).not.toHaveBeenCalled();
|
||||||
|
expect(host.mocks.storageAccess.files.has(FlagFilesOriginal.FETCH_ALL)).toBe(false);
|
||||||
|
await expect(handler.check()).resolves.toBe(false);
|
||||||
|
expect(host.mocks.setting.applyPartial).toHaveBeenCalledWith(
|
||||||
|
{
|
||||||
|
suspendFileWatching: true,
|
||||||
|
suspendParseReplicationResult: true,
|
||||||
|
},
|
||||||
|
true
|
||||||
|
);
|
||||||
|
expect(host.mocks.appLifecycle.performRestart).toHaveBeenCalledOnce();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should activate selected remote configuration", async () => {
|
it("should activate selected remote configuration", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user