Add comparison helper to NextcloudDirectoryMetadataTable

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-01-26 18:35:01 +01:00
parent c4014e8b6a
commit 496b94a9a7
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -126,6 +126,13 @@ class NextcloudItemMetadataTable: Object {
}
class NextcloudDirectoryMetadataTable: Object {
func isInSameRemoteState(_ comparingMetadata: NextcloudDirectoryMetadataTable) -> Bool {
return comparingMetadata.etag == self.etag &&
comparingMetadata.e2eEncrypted == self.e2eEncrypted &&
comparingMetadata.favorite == self.favorite &&
comparingMetadata.permissions == self.permissions
}
@objc dynamic var account = ""
@objc dynamic var colorFolder: String?
@objc dynamic var e2eEncrypted: Bool = false