Skip to content

Commit 3f9cf92

Browse files
code
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
1 parent 56ae8d2 commit 3f9cf92

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Sources/NextcloudKit/Models/NKProperties.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,14 @@ public enum NKProperties: String, CaseIterable {
7878
}
7979

8080
static func trashProperties() -> String {
81-
let properties: [String] = [displayname.rawValue, getcontenttype.rawValue, resourcetype.rawValue, id.rawValue, fileid.rawValue, size.rawValue, haspreview.rawValue, "<trashbin-filename xmlns=\"http://nextcloud.org/ns\"/>", "<trashbin-original-location xmlns=\"http://nextcloud.org/ns\"/>", "<trashbin-deletion-time xmlns=\"http://nextcloud.org/ns\"/>"]
82-
return properties.joined()
81+
let base = allCases.map { $0.rawValue }.joined()
82+
83+
let trashExtras = [
84+
"<trashbin-filename xmlns=\"http://nextcloud.org/ns\"/>",
85+
"<trashbin-original-location xmlns=\"http://nextcloud.org/ns\"/>",
86+
"<trashbin-deletion-time xmlns=\"http://nextcloud.org/ns\"/>"
87+
].joined()
88+
89+
return base + trashExtras
8390
}
8491
}

0 commit comments

Comments
 (0)