* [wip] Create worker for push registration and call it from someplace in UI
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* [wip] Subscription registration request
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Don't enqueue push registration worker from UI
* Enqueue PushRegistrationWorker on collection changes
* Fix tests
* Update dav4jvm; Use new post method
* Remove obsolete context
* Add get and deleteAll methods to serviceRepository and update usages
* requestPushRegistration: make endpoint an argument
* Update push subscription fields in DB on successful registration
* Don't create notification channels in test class
* Remove workmanager init and provide empty set of listeners in tests
* Require network connection to run PushRegistrationWorker
* Move module declaration to a separate TestModules interface
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
Co-authored-by: Sunik Kupfer <kupfer@bitfire.at>
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Call collection updates and setters only from repository
* Make collection repository changes observable
* Add kdoc
* Add basic test
* Extract RefreshCollectionsWorker; move some HomeSetDao calls to DavHomeSetRepository
* Replace more HomeSetDao calls
* Remove duplicate copyright notice
* Drop weak reference for observers
* Rename method
* Remove test service after run
* Verify notifying works with mockk
* Rename test
* Use construction injection
* Remove unused SettingsManager
* Remove obsolete mockk rule
* Use runBlocking instead of runTest
* Change to observer linkedList to mutableSetOf, remove synchronized calls
* Change to hilt multibinding
* Remove some unnecessary lines; allow empty set by Hilt
* CollectionListRefresher: delete collections using repository
* deleteRemote: call callback too; adapt KDoc
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* MKCALENDAR: wrap supported compoents in <CALDAV:supported-calendar-component-set>
* MKCALENDAR/MKCOL body generation: use Property.Name from dav4jvm instead of own strings
* [WIP] Colors
* Update navigation drawer
* Update colors
* [WIP] PermissionSwitchRow night mode
* Fix PermissionSwitchRow icon in night mode
* Use more intense colors for FABs
* Use correct account name when retrieving service
* Rename method, add kdoc
* Address books: require main account and use as Account
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Fixed padding for "Show only personal checkbox"
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Aligned text correctly
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
---------
Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
* Select nextcloud login type on nextcloud setup intent
* Fix linting error
* Add documentation
* Move model creation to compose LoginScreen
* Minor changes
- Use boolean to decide on skipping startPage
- Move login type selection logic to login types provider
* Minor changes
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Extract composables
* Drop sub component previews and minor adjustment
* Fix preview
* Extract view model
* Switch to M3
* Extract URI to Constant
* Minor changes
* We alway have AccountSettings
* Replace LiveData by State
* Use Snapshot.withMutableSnapshot in reload
* Don't show empty OAuth setting
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* Refine chips in collection list
* Refine PermissionSwitchRow
* Collections list
* Fix WelcomePage and IntroActivity background color in dark mode
* Fix RadioWithSwitch in dark mode
* Drawer handler: branding in dark mode
* Extract composables
* Extract model and companion object
* Switch to M3
* Linting
* Drop previews for sub composables
* Minor adjustments for readability
* Minor changes
- use manual URL from Constants
- use M3 in some Composables
* Create PreferenceRepository (for now only for verbose logging)
* Move actual settings to model; M3 Composables
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>
* [WIP] More hilt
* Use assisted inject for AccountSettingsMigrations
* DavDocumentsProvider: inject CredentialsStore
* Create a new WebdavScope and scope caches and credentials store to it
* Fix CredentialsStoreTest
* Convert M2 calls to M3
* Extract composable to screen
* Extract viewmodel
* Make screen model independent
* Use only primitive types in screen
* Introduce uiState class and switch to compose state where easy
* Switch remaining live data to compose state
* Add kdoc
* Add scrolling, adapt buttons to M3
* Move Intent logic to Activity
- create/handle Intent in Activity (may be replaced by NavGraph in future)
- Activity: pass unpacked initial data to Screen
- Screen: use hiltViewModel (adds hilt-navigation-compose dependency) to
create model with initial data
- Screen: use Column instead of LazyColumn
* Fix test
* Optimize imports
* Minor changes
* Move AppTheme, fix showDebugInfo
* View instead of share logs; make local/remote resource smaller; make remote resource selectable
* Leave space for scrolling down past the FAB; don't show "Local resource: null"
* Re-order composables
---------
Co-authored-by: Ricki Hirner <hirner@bitfire.at>