From 496b94a9a73f53e07d2982d13b3094729b6432bf Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 26 Jan 2023 18:35:01 +0100 Subject: [PATCH] Add comparison helper to NextcloudDirectoryMetadataTable Signed-off-by: Claudio Cambra --- .../FileProviderExt/NextcloudFilesDatabaseTables.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/NextcloudFilesDatabaseTables.swift b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/NextcloudFilesDatabaseTables.swift index 87bd0e57a..f0a487b6c 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/NextcloudFilesDatabaseTables.swift +++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/NextcloudFilesDatabaseTables.swift @@ -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