* DavHomeSetRepository, DavServiceRepository: apply new naming scheme for (non-)suspending calls
* AccountRepository: apply new naming scheme for (non-)suspending calls
* Update repository methods to new naming scheme
* Remove packaging resources exclusion and configurations
* Update mikepenz-aboutLibraries to 12.1.0-rc03 and configure resource merging for LICENSE files
* Update subscriptions when collection is (un)selected for sync
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Remove collections change listener and its hilt module
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Remove observer pattern to listen for collection changes
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Update push subscriptions when collection is (un)selected for sync
* Update collection selection listener to use lazy initialization
* Update push subscriptions and sync when collection is (un)selected for sync
* Update app/src/main/kotlin/at/bitfire/davdroid/ui/CollectionSelectedUseCase.kt
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Move CollectionSelectedUseCase to account package
* Add test for CollectionSelectedUseCase
* Inject application scope instead of using a factory
* Update tests to run on our main dispatcher
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Handle non-existing account gracefully when (un)subscribing collections
* Unsubscribe from all (subscribed) collections when no push distributor is selected
* Upgrade UnifiedPush Connector to 3.0.4
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Updated overrides
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added storing keys and auths
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Excluded tink
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Fixed deprecations and calls
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Integrate UnifiedPush 3.x connector and FCM distributor
* Integrate UnifiedPush connector 3.x, use VAPID and message encryption
* [WIP] Refactor push registration logic and remove deprecated methods
* [WIP] Remove PushRegistrationWorkerManager and refactor PushRegistrationManager
* Remove unused service repository dependency and update worker to suspend
* Add suspend modifier to DAO methods and repository methods
* Add runBlocking to getByService call in CollectionListRefresherTest
* Add documentation for UnifiedPushService and PushRegistrationManager
* Add fallback for push messages without topic
* [WIP] Add UnifiedPushService test with workaround for PushService binder
* Update UnifiedPush library version and clean up test code
* Refactor push message handling, synchronization and coroutines
* Add coroutine dispatchers for push registration and unregistration
* Add async support for push subscription updates
* Refactor unsubscribe logic into reusable method
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Perform delayed sync on a collection UI change
- sync state
- force-read-only state
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Use withContext to access DB on background thread
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Remove return comment
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Extract delay value to constant
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Use accountRepository to create account from name
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
---------
Signed-off-by: Sunik Kupfer <kupfer@bitfire.at>
* Extract notification handling to separate class
* Notify user at sync if content provider is missing
* Dismiss only content provider specific notification
* Remove title from notification text body
* Move sync warning strings into their own block
* Add KDoc, duplicate method for clarity
* Show message in notification for disabled tasks apps
* Pass authority through method calls
* Shorten method names
* Don't show content provider error notification when missing permission
* Rename methods and remove obsolete var
* Add spacing in content provider missing warning
* Improve kdoc
* Remove obsolete tasks provider error messages
* Syntactic sugar
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Added timestamp to debug info
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Added timestamp to `DebugInfoActivity.IntentBuilder`
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
* Show local time and UTC of timestamp
---------
Signed-off-by: Arnau Mora <arnyminerz@proton.me>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Add LocalTestAddressBookStore.kt
* Update tests acquiring local test address books
* Remove unused methods from LocalTestAddressBook
* Extract dirty check methods to the single test class using them
* Remove unused read only flag
* Drop obsolete context
* Reusables as properties
* Rename LocalTestAddressBookStore to LocalTestAddressBookProvider
* Minor changes
* Remove test address book after provision finishes and don't remove all before
* Fix more tests by removing address book accounts after run, not before
* Wrap provision method call in try-finally
* Rename provide methods anonymous function param for clarity
* Extract account recreation to variable
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Use seeded random number generator for a 100% deterministic test result
* Fix typo
* Rename variable
* Mock random numbers and assert corresponding record is found