-
-
Notifications
You must be signed in to change notification settings - Fork 97
[WebDAV] Implement command pattern, streamline lifecycle, remove WebdavScope #1617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebDAV] Implement command pattern, streamline lifecycle, remove WebdavScope #1617
Conversation
…mentation to DavDocumentsProvider
c89a09d
to
97a9dcd
Compare
… cleared when DavDocumentsProvider is shut down
97a9dcd
to
aa7fc92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the WebDAV documents provider by removing the WebdavScope
annotation and reorganizing the code into separate operation classes. The main purpose is to simplify the dependency injection structure and improve code organization by breaking down the large DavDocumentsProvider
class into focused, testable operation components.
Key changes:
- Removed
WebdavScope
custom DI scope and related components - Extracted WebDAV operations into dedicated classes with clear responsibilities
- Simplified the main
DavDocumentsProvider
to use individual operation classes via EntryPoint pattern - Consolidated utility functions into
DocumentProviderUtils
Reviewed Changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
WebdavScope.kt | Deleted custom Dagger scope and component definitions |
DavDocumentsProvider.kt | Refactored to delegate operations to separate classes via EntryPoint |
operation/*.kt | New operation classes for each WebDAV document provider functionality |
DocumentProviderUtils.kt | New utility class consolidating helper functions and extension methods |
DavHttpClientBuilder.kt | New dedicated class for building HTTP clients |
ThumbnailCache.kt | Removed @WebdavScoped annotation |
RandomAccessCallbackWrapper.kt | Simplified API level requirement annotation |
WebDavMountRepository.kt | Updated method calls to use new utility class |
QueryChildDocumentsOperationTest.kt | Updated test to use new operation class directly |
Bridged.kt | New qualifier annotation |
Files not reviewed (1)
- .idea/codeStyles/Project.xml: Language not supported
app/src/main/kotlin/at/bitfire/davdroid/webdav/RandomAccessCallbackWrapper.kt
Show resolved
Hide resolved
app/src/main/kotlin/at/bitfire/davdroid/webdav/operation/QueryChildDocumentsOperation.kt
Show resolved
Hide resolved
0783e96
to
5276ddf
Compare
onCreate()
for initialization. A content provider lives until the whole process is terminated. So there's no chance to remove the WebdavScope from memory, which makes the whole scope useless. (Which is probably the reason why there is no such scope in Hilt by default).DocumentProviderUtils
.