Skip to content

Do not try to evict an item on disabling keep downloaded#76

Merged
claucambra merged 1 commit into
mainfrom
bugfix/do-not-evict-keep-downloaded
May 14, 2025
Merged

Do not try to evict an item on disabling keep downloaded#76
claucambra merged 1 commit into
mainfrom
bugfix/do-not-evict-keep-downloaded

Conversation

@claucambra
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
@claucambra claucambra added this to the 2.1 milestone May 14, 2025
@claucambra claucambra requested a review from Copilot May 14, 2025 07:43
@claucambra claucambra self-assigned this May 14, 2025
@claucambra claucambra added the bug Something isn't working label May 14, 2025
Copy link
Copy Markdown
Contributor

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 updates the logic for handling the "keep downloaded" flag by removing the eviction call when an item is already downloaded and the flag is disabled.

  • Removed the call to evict a downloaded item on disabling "keep downloaded".
  • Now, regardless of the download state, the manager is instructed to modify the item's last used date.
Comments suppressed due to low confidence (1)

Sources/NextcloudFileProviderKit/Item/Item+KeepDownloaded.swift:32

  • [nitpick] Consider adding an inline comment to explain the reasoning behind removing the eviction logic, to help future maintainers understand that this is an intentional design decision.
else if !keepDownloaded && isDownloaded { try await manager.evictItem(identifier: itemIdentifier) }

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.10%. Comparing base (8b4f960) to head (3a95a66).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
+ Coverage   81.07%   81.10%   +0.02%     
==========================================
  Files          62       62              
  Lines       13507    13505       -2     
==========================================
+ Hits        10951    10953       +2     
+ Misses       2556     2552       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claucambra claucambra merged commit cdcb255 into main May 14, 2025
3 checks passed
@claucambra claucambra deleted the bugfix/do-not-evict-keep-downloaded branch May 14, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants