Editor refactor: extract system stuff

This commit is contained in:
Zef Hemel
2023-07-14 13:44:30 +02:00
parent 87b0e7e352
commit b39a9b8e22
8 changed files with 240 additions and 190 deletions
+4 -4
View File
@@ -1,13 +1,13 @@
import { SysCallMapping } from "../../plugos/system.ts";
import { SyncService } from "../sync_service.ts";
import type { Editor } from "../editor.tsx";
export function syncSyscalls(syncService: SyncService): SysCallMapping {
export function syncSyscalls(editor: Editor): SysCallMapping {
return {
"sync.isSyncing": (): Promise<boolean> => {
return syncService.isSyncing();
return editor.syncService.isSyncing();
},
"sync.hasInitialSyncCompleted": (): Promise<boolean> => {
return syncService.hasInitialSyncCompleted();
return editor.syncService.hasInitialSyncCompleted();
},
};
}