Added skills, shortcuts, and bugifixes++
This commit is contained in:
@@ -16,6 +16,12 @@ class GitSyncService {
|
||||
// Debounce tracking
|
||||
private var pendingSyncTask: Task<Void, Never>?
|
||||
|
||||
private init() {
|
||||
// Check if repository is cloned at initialization (synchronous check)
|
||||
let localPath = expandPath(settings.syncLocalPath)
|
||||
syncStatus.isCloned = FileManager.default.fileExists(atPath: localPath + "/.git")
|
||||
}
|
||||
|
||||
// MARK: - Repository Operations
|
||||
|
||||
/// Test connection to remote repository
|
||||
@@ -366,9 +372,17 @@ class GitSyncService {
|
||||
/// Sync on app startup (pull + import only, no push)
|
||||
/// Runs silently in background to fetch changes from other devices
|
||||
func syncOnStartup() async {
|
||||
// First, update status to check if repo is actually cloned
|
||||
await updateStatus()
|
||||
|
||||
// Only run if configured and cloned
|
||||
guard settings.syncConfigured && syncStatus.isCloned else {
|
||||
log.debug("Skipping startup sync (not configured or not cloned)")
|
||||
guard settings.syncConfigured else {
|
||||
log.debug("Skipping startup sync (sync not configured)")
|
||||
return
|
||||
}
|
||||
|
||||
guard syncStatus.isCloned else {
|
||||
log.debug("Skipping startup sync (repository not cloned)")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user