Update drag and drop update and sync to db

This commit is contained in:
2025-10-18 13:50:44 +02:00
parent 76fcc64125
commit 4d82d4c4b7
2 changed files with 4 additions and 1 deletions

View File

@@ -134,6 +134,8 @@ export async function updateHabit(id, updates) {
console.warn('Supabase updateHabit error, writing local:', error.message);
return local.updateHabit(id, updates);
}
// After any update, trigger a sync to ensure all local changes (including categories) are pushed to remote
await syncLocalToRemoteIfNeeded();
}
export async function deleteHabit(id) {