Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 0be462c

Browse files
committed
Set private link capability to unknown type when it is not retrieved
The CapabilityBooleanType.fromBooleanValue set it to FALSE when the capability is not retrieved. We don't want this for this case. Probably neither for the rest, but changing that now would need deeper testing
1 parent 32ef5d2 commit 0be462c

File tree

1 file changed

+1
-1
lines changed
  • owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/responses

1 file changed

+1
-1
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/responses/CapabilityResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ data class CapabilityResponse(
6969
filesBigFileChunking = CapabilityBooleanType.fromBooleanValue(capabilities?.fileCapabilities?.bigfilechunking),
7070
filesUndelete = CapabilityBooleanType.fromBooleanValue(capabilities?.fileCapabilities?.undelete),
7171
filesVersioning = CapabilityBooleanType.fromBooleanValue(capabilities?.fileCapabilities?.versioning),
72-
filesPrivateLinks = CapabilityBooleanType.fromBooleanValue(capabilities?.fileCapabilities?.privateLinks),
72+
filesPrivateLinks = capabilities?.fileCapabilities?.privateLinks?.let { CapabilityBooleanType.fromBooleanValue(it) } ?: CapabilityBooleanType.UNKNOWN,
7373
filesAppProviders = capabilities?.fileCapabilities?.appProviders?.map { it.toOCISProvider() },
7474
filesSharingFederationIncoming = CapabilityBooleanType.fromBooleanValue(capabilities?.fileSharingCapabilities?.fileSharingFederation?.incoming),
7575
filesSharingFederationOutgoing = CapabilityBooleanType.fromBooleanValue(capabilities?.fileSharingCapabilities?.fileSharingFederation?.outgoing),

0 commit comments

Comments
 (0)