We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3194d4 commit 3dbcf59Copy full SHA for 3dbcf59
library/src/main/java/com/owncloud/android/lib/resources/shares/extensions/OCShareExtensions.kt
@@ -23,12 +23,11 @@ fun toggleAllowDownloadAndSync(
23
isChecked: Boolean,
24
useV2DownloadAttributes: Boolean
25
): String? {
26
- val jsonArray =
27
- if (attributes?.isEmpty() == true) {
28
- JSONArray()
29
- } else {
30
- JSONArray(attributes)
31
- }
+ var jsonArray = JSONArray()
+ if (!attributes.isNullOrEmpty()) {
+ jsonArray = JSONArray(attributes)
+ }
+
32
val downloadAttr = jsonArray.findDownloadAttribute()
33
val enabledKey = getEnabledKey(useV2DownloadAttributes)
34
0 commit comments