Skip to content

Conversation

rfc2822
Copy link
Member

@rfc2822 rfc2822 commented Jul 28, 2025

  • Remove WebdavScope: there is no content provider lifecycle except 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).
  • Moved each WebDAV operation to a separate class (command pattern) with its own well-defined dependencies.
  • Moved common methods to DocumentProviderUtils.

@rfc2822 rfc2822 linked an issue Jul 28, 2025 that may be closed by this pull request
@rfc2822 rfc2822 force-pushed the 1616-remove-webdavscope-as-theres-no-reason-to-use-it-anymore branch 2 times, most recently from c89a09d to 97a9dcd Compare July 28, 2025 19:40
… cleared when DavDocumentsProvider is shut down
@rfc2822 rfc2822 force-pushed the 1616-remove-webdavscope-as-theres-no-reason-to-use-it-anymore branch from 97a9dcd to aa7fc92 Compare July 28, 2025 19:50
@rfc2822 rfc2822 requested a review from Copilot July 29, 2025 08:03
@rfc2822 rfc2822 self-assigned this Jul 29, 2025
@rfc2822 rfc2822 added the refactoring Internal improvement of existing functions label Jul 29, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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

@rfc2822 rfc2822 force-pushed the 1616-remove-webdavscope-as-theres-no-reason-to-use-it-anymore branch from 0783e96 to 5276ddf Compare July 29, 2025 08:07
@rfc2822 rfc2822 changed the title Remove WebdavScope as it is no longer needed [WebDAV] Implement command pattern, streamline lifecycle, remove WebdavScope Jul 29, 2025
@rfc2822 rfc2822 marked this pull request as ready for review July 29, 2025 08:13
@rfc2822 rfc2822 merged commit 44b52f6 into main-ose Jul 29, 2025
10 checks passed
@rfc2822 rfc2822 deleted the 1616-remove-webdavscope-as-theres-no-reason-to-use-it-anymore branch July 29, 2025 08:17
@rfc2822 rfc2822 added the webdav related to WebDAV file access label Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Internal improvement of existing functions webdav related to WebDAV file access
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove WebDavScope as there's no reason to use it (anymore)
1 participant