feat: add background sync for Matrix client on mobile platforms
Some checks failed
Build / check-version (push) Successful in 5s
Build / build-linux (push) Successful in 9m42s
Build / build-windows (push) Successful in 10m16s
Build / build-android (push) Failing after 1h57m27s
Build / create-release (push) Has been cancelled

- Introduced background sync functionality for the Matrix client, allowing notifications to be received even when the app is backgrounded.
- Added new commands to start, stop, and get the state of background sync.
- Implemented a BackgroundSyncManager to manage sync state and credentials.
- Integrated matrix-sdk for handling Matrix interactions and notifications.
- Updated Cargo.toml to include necessary dependencies for background sync.
- Modified mobile capabilities to include opener permissions.
- Enhanced lib.rs to handle new commands and integrate background sync logic.
This commit is contained in:
2026-02-05 19:20:55 +11:00
parent ece77ccba6
commit 5ad2747a2f
8 changed files with 2279 additions and 54 deletions

View File

@@ -24,6 +24,7 @@ serde = { version = "1.0", features = ["derive"] }
tauri = { version = "2", features = ["devtools", "tray-icon", "image-png"] }
tauri-plugin-opener = "2"
tauri-plugin-notification = "2"
log = "0.4"
[target."cfg(target_os = \"linux\")".dependencies]
arboard = { version = "3", features = ["wayland-data-control"] }
@@ -35,6 +36,10 @@ gtk = "0.18"
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-deep-link = "2"
# Matrix SDK for native background sync (no sqlite on mobile - use in-memory store)
matrix-sdk = { version = "0.7", default-features = false, features = ["rustls-tls", "e2e-encryption"] }
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time"] }
[target."cfg(not(any(target_os = \"android\", target_os = \"ios\")))".dependencies]
tauri-plugin-localhost = "2"
tauri-plugin-window-state = "2"