diff options
Diffstat (limited to 'Hotline/Models')
| -rw-r--r-- | Hotline/Models/FileInfo.swift | 4 | ||||
| -rw-r--r-- | Hotline/Models/Hotline.swift | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Hotline/Models/FileInfo.swift b/Hotline/Models/FileInfo.swift index 5976b8f..9caa976 100644 --- a/Hotline/Models/FileInfo.swift +++ b/Hotline/Models/FileInfo.swift @@ -11,6 +11,7 @@ import SwiftUI let fileSize: UInt let isFolder: Bool + let isUnavailable: Bool var expanded: Bool = false var children: [FileInfo]? = nil @@ -22,6 +23,9 @@ import SwiftUI self.creator = hotlineFile.creator self.fileSize = UInt(hotlineFile.fileSize) self.isFolder = hotlineFile.isFolder + self.isUnavailable = (!self.isFolder && (self.fileSize == 0)) + + print(self.name, self.type, self.creator, self.isUnavailable) if self.isFolder { self.children = [] } diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift index fa0128c..0e9ca9e 100644 --- a/Hotline/Models/Hotline.swift +++ b/Hotline/Models/Hotline.swift @@ -151,7 +151,6 @@ import SwiftUI } else if path.isEmpty { self?.filesLoaded = true - self?.files = newFiles } |