diff --git a/src/abstractions/sync.service.ts b/src/abstractions/sync.service.ts index a3287c39c9..ef4b4e8dc8 100644 --- a/src/abstractions/sync.service.ts +++ b/src/abstractions/sync.service.ts @@ -1,9 +1,9 @@ -export interface SyncService { +export abstract class SyncService { syncInProgress: boolean; - getLastSync(): Promise; - setLastSync(date: Date): Promise; - syncStarted(): void; - syncCompleted(successfully: boolean): void; - fullSync(forceSync: boolean): Promise; + getLastSync: () => Promise; + setLastSync: (date: Date) => Promise; + syncStarted: () => void; + syncCompleted: (successfully: boolean) => void; + fullSync: (forceSync: boolean) => Promise; } diff --git a/src/services/sync.service.ts b/src/services/sync.service.ts index 79e726c9aa..f233803c3e 100644 --- a/src/services/sync.service.ts +++ b/src/services/sync.service.ts @@ -6,7 +6,7 @@ import { FolderService } from '../abstractions/folder.service'; import { MessagingService } from '../abstractions/messaging.service'; import { SettingsService } from '../abstractions/settings.service'; import { StorageService } from '../abstractions/storage.service'; -import { SyncService as SyncServiceInterface } from '../abstractions/sync.service'; +import { SyncService as SyncServiceAbstraction } from '../abstractions/sync.service'; import { UserService } from '../abstractions/user.service'; import { CipherData } from '../models/data/cipherData'; @@ -23,7 +23,7 @@ const Keys = { lastSyncPrefix: 'lastSync_', }; -export class SyncService implements SyncServiceInterface { +export class SyncService implements SyncServiceAbstraction { syncInProgress: boolean = false; constructor(private userService: UserService, private apiService: ApiService,