From fe6935a6b77d315498ffd6b64595a1456d774de4 Mon Sep 17 00:00:00 2001 From: inventory69 Date: Wed, 11 Feb 2026 09:06:30 +0100 Subject: [PATCH] fix(sync): IMPL_11 - Remove unexpected toast on auto-sync - Remove toast emission in triggerAutoSync() (L697) - Silent sync now fully respects silent=true flag - Notes list still updates via loadNotes(), no UX loss - Toast was bypassing SyncStateManager's silent handling Changes: - android/app/.../ui/main/MainViewModel.kt: Remove _showToast.emit() on auto-sync success --- .../java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt b/android/app/src/main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt index 9843eaa..89ebde3 100644 --- a/android/app/src/main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt +++ b/android/app/src/main/java/dev/dettmer/simplenotes/ui/main/MainViewModel.kt @@ -692,9 +692,10 @@ class MainViewModel(application: Application) : AndroidViewModel(application) { if (result.isSuccess && result.syncedCount > 0) { Logger.d(TAG, "✅ Auto-sync successful ($source): ${result.syncedCount} notes") - // Silent Sync mit echten Änderungen → trotzdem markCompleted (wird silent behandelt) + // 🆕 v1.8.1 (IMPL_11): Kein Toast bei Silent-Sync + // Das Banner-System respektiert silent=true korrekt (markCompleted → IDLE) + // Toast wurde fälschlicherweise trotzdem angezeigt SyncStateManager.markCompleted(getString(R.string.toast_sync_success, result.syncedCount)) - _showToast.emit(getString(R.string.snackbar_synced_count, result.syncedCount)) loadNotes() } else if (result.isSuccess) { Logger.d(TAG, "ℹ️ Auto-sync ($source): No changes")