Remove share attributes & use OCShare extensions#1758
Merged
alperozturk96 merged 7 commits intomasterfrom Jul 17, 2025
Merged
Conversation
Contributor
Contributor
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1758 +/- ##
============================================
- Coverage 43.06% 42.85% -0.22%
+ Complexity 987 981 -6
============================================
Files 235 233 -2
Lines 8569 8574 +5
Branches 1123 1127 +4
============================================
- Hits 3690 3674 -16
- Misses 4361 4390 +29
+ Partials 518 510 -8
🚀 New features to boost your workflow:
|
Contributor
1 task
Contributor
alperozturk96
commented
Jul 1, 2025
| private const val VALUE_KEY = "value" | ||
| private const val ENABLED_KEY = "enabled" | ||
|
|
||
| fun toggleAllowDownloadAndSync( |
Contributor
Author
There was a problem hiding this comment.
This cannot be implemented as an extension, as the share object does not exist at the time of share creation. Therefore, optional attributes should be passed as a string parameter instead.
Contributor
ad5fb9e to
3dbcf59
Compare
Contributor
Signed-off-by: alperozturk <alper_ozturk@proton.me>
… a new share Signed-off-by: alperozturk <alper_ozturk@proton.me>
3dbcf59 to
0303be5
Compare
Contributor
AndyScherzinger
approved these changes
Jul 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Client PR: nextcloud/android#15074
Issue
Since Nextcloud 30, the enabled key have been renamed to value and supports more than boolean.
Introducing a generic data class to handle both variations of the JSONArray adds unnecessary complexity when creating or updating the download attribute of a share. Instead, we can simplify the implementation by directly constructing a JsonArray with JsonObject elements, while still providing the same functionality.