mirror of
https://github.com/nextcloud/android-library.git
synced 2025-07-23 00:49:38 +00:00

committed by
Alper Öztürk

parent
bb94fbce23
commit
0303be50f9
@ -23,12 +23,11 @@ fun toggleAllowDownloadAndSync(
|
||||
isChecked: Boolean,
|
||||
useV2DownloadAttributes: Boolean
|
||||
): String? {
|
||||
val jsonArray =
|
||||
if (attributes?.isEmpty() == true) {
|
||||
JSONArray()
|
||||
} else {
|
||||
JSONArray(attributes)
|
||||
}
|
||||
var jsonArray = JSONArray()
|
||||
if (!attributes.isNullOrEmpty()) {
|
||||
jsonArray = JSONArray(attributes)
|
||||
}
|
||||
|
||||
val downloadAttr = jsonArray.findDownloadAttribute()
|
||||
val enabledKey = getEnabledKey(useV2DownloadAttributes)
|
||||
|
||||
|
Reference in New Issue
Block a user