Review and refine sync logic

This commit reviews and refines the synchronization logic to ensure proper functionality and data integrity.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-21 11:24:40 +00:00
parent e55dfac3a9
commit 8e6eb9d8aa
15 changed files with 567 additions and 357 deletions

View File

@@ -1,26 +1,9 @@
import { isSyncEnabled, setSyncEnabled, initSyncSettings } from './sync/config';
import { getLastSyncTime, setLastSyncTime } from './sync/time';
import { trySyncAllData } from './sync/data';
import { clearCloudData } from './sync/clearCloudData';
// 편의를 위한 인덱스 파일
// SyncResult 타입 내보내기 수정
export type { SyncResult } from './sync/data';
// 모든 유틸리티 함수를 동일한 공개 API로 유지하기 위해 내보내기
export {
isSyncEnabled,
setSyncEnabled,
getLastSyncTime,
setLastSyncTime,
trySyncAllData,
clearCloudData,
initSyncSettings
};
// App.tsx에서 사용하는 initSyncState 함수 추가
export const initSyncState = async (): Promise<void> => {
// 동기화 설정 초기화
initSyncSettings();
console.log('동기화 상태 초기화 완료');
};
// 모든 동기화 관련 함수들을 하나로 모아서 내보냄
export * from './sync/syncSettings';
export * from './sync/data';
export * from './sync/time';
export * from './sync/transaction';
export * from './sync/budget';