|
@@ -112,6 +112,18 @@ extension tableMetadata {
|
|
|
classFile == NKCommon.typeClassFile.image.rawValue || ["application/pdf", "com.adobe.pdf"].contains(contentType) || contentType.hasPrefix("text/")
|
|
|
}
|
|
|
|
|
|
+ var isDownloadUpload: Bool {
|
|
|
+ status == NCGlobal.shared.metadataStatusInDownload || status == NCGlobal.shared.metadataStatusDownloading || status == NCGlobal.shared.metadataStatusInUpload || status == NCGlobal.shared.metadataStatusUploading
|
|
|
+ }
|
|
|
+
|
|
|
+ var isDownload: Bool {
|
|
|
+ status == NCGlobal.shared.metadataStatusInDownload || status == NCGlobal.shared.metadataStatusDownloading
|
|
|
+ }
|
|
|
+
|
|
|
+ var isUpload: Bool {
|
|
|
+ status == NCGlobal.shared.metadataStatusInUpload || status == NCGlobal.shared.metadataStatusUploading
|
|
|
+ }
|
|
|
+
|
|
|
/// Returns false if the user is lokced out of the file. I.e. The file is locked but by somone else
|
|
|
func canUnlock(as user: String) -> Bool {
|
|
|
return !lock || (lockOwner == user && lockOwnerType == 0)
|