File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
library/src/main/java/com/owncloud/android/lib/resources/status Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,10 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation {
173173 private static final String NODE_FILES_DOWNLOAD_LIMIT = "downloadlimit" ;
174174 private static final String FILES_DOWNLOAD_LIMIT_DEFAULT = "default-limit" ;
175175
176+ // notes folder location
177+ private static final String NODE_NOTES = "notes" ;
178+ private static final String NOTES_PATH = "notes_path" ;
179+
176180 private OCCapability currentCapability = null ;
177181
178182 public GetCapabilitiesRemoteOperation () {
@@ -770,6 +774,22 @@ private OCCapability parseResponse(String response) throws JSONException {
770774 } else {
771775 capability .setRecommendations (CapabilityBooleanType .FALSE );
772776 }
777+
778+ // notes folder
779+ if (respCapabilities .has (NODE_NOTES )) {
780+ JSONObject notesCapability = respCapabilities .getJSONObject (NODE_NOTES );
781+
782+ if (notesCapability .has (NOTES_PATH )) {
783+ String notesFolderPath = notesCapability .getString (NOTES_PATH );
784+
785+ if (!notesFolderPath .isEmpty () && !notesFolderPath .endsWith ("/" )) {
786+ notesFolderPath += "/" ;
787+ }
788+
789+ capability .setNotesFolderPath (notesFolderPath );
790+ }
791+ }
792+
773793 }
774794
775795 Log_OC .d (TAG , "*** Get Capabilities completed " );
Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ class OCCapability {
117117 var filesDownloadLimit = CapabilityBooleanType .UNKNOWN
118118 var filesDownloadLimitDefault = - 1
119119
120+ // notes folder location
121+ var notesFolderPath: String? = null
122+
120123 // Etag for capabilities
121124 var etag: String? = " "
122125
You can’t perform that action at this time.
0 commit comments