-
Notifications
You must be signed in to change notification settings - Fork 95
Remove share attributes & use OCShare extensions #1758
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
Conversation
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:
|
private const val VALUE_KEY = "value" | ||
private const val ENABLED_KEY = "enabled" | ||
|
||
fun toggleAllowDownloadAndSync( |
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.
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.
ad5fb9e
to
3dbcf59
Compare
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
… a new share Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
3dbcf59
to
0303be5
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.
LGTM
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.