feat: add background sync for Matrix client on mobile platforms
Some checks failed
Some checks failed
- 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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user