fix(v1.5.0): Silent-Sync Mode + UI Improvements
Silent-Sync Implementation (Auto-Sync Banner Fix): - Add SYNCING_SILENT state to SyncStateManager for background syncs - Auto-sync (onResume) now triggers silently without banner interruption - Silent-sync state blocks additional manual syncs (mutual exclusion) - Error banners still display even after silent-sync failures - SyncStatus tracks 'silent' flag to hide COMPLETED banners after silent-sync UI/UX Improvements (from v1.5.0 post-migration fixes): - Fix text wrapping in checklist items (singleLine=false, maxLines=5) - Fix cursor position in text notes (use TextFieldValue with TextRange) - Display app icon instead of emoji in AboutScreen - Add smooth slide animations for NoteEditor transitions - Remove visual noise from AboutScreen icon Technical Changes: - ComposeNoteEditorActivity: Add back animation with OnBackPressedCallback - ComposeMainActivity: Add entry/exit slide animations for note editing - NoteEditorScreen: Use TextFieldValue for proper cursor positioning - ChecklistItemRow: Enable text wrapping for long checklist items - AboutScreen: Convert Drawable to Bitmap via Canvas (supports AdaptiveIcon) - SyncStatusBanner: Exclude SYNCING_SILENT from visibility checks - MainActivity: Update legacy auto-sync to use silent mode Fixes #[auto-sync-banner], improves #[user-experience] Branch: feature/v1.5.0
This commit is contained in:
@@ -182,6 +182,11 @@ class MainActivity : AppCompatActivity() {
|
||||
swipeRefreshLayout.isRefreshing = false
|
||||
syncStatusBanner.visibility = View.GONE
|
||||
}
|
||||
// v1.5.0: Silent-Sync - Banner nicht anzeigen, aber Sync-Controls deaktivieren
|
||||
SyncStateManager.SyncState.SYNCING_SILENT -> {
|
||||
setSyncControlsEnabled(false)
|
||||
// Kein Banner anzeigen bei Silent-Sync (z.B. onResume Auto-Sync)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,6 +227,7 @@ class MainActivity : AppCompatActivity() {
|
||||
* - Nur Success-Toast (kein "Auto-Sync..." Toast)
|
||||
*
|
||||
* NOTE: WiFi-Connect Sync nutzt WorkManager (auch wenn App geschlossen!)
|
||||
* v1.5.0: Silent-Sync - kein Banner während des Syncs, Fehler werden trotzdem angezeigt
|
||||
*/
|
||||
private fun triggerAutoSync(source: String = "unknown") {
|
||||
// Throttling: Max 1 Sync pro Minute
|
||||
@@ -230,7 +236,8 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
// 🔄 v1.3.1: Check if sync already running
|
||||
if (!SyncStateManager.tryStartSync("auto-$source")) {
|
||||
// v1.5.0: silent=true - kein Banner bei Auto-Sync
|
||||
if (!SyncStateManager.tryStartSync("auto-$source", silent = true)) {
|
||||
Logger.d(TAG, "⏭️ Auto-sync ($source): Another sync already in progress")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user