diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-01-01 11:35:49 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-01-01 11:35:49 -0800 |
| commit | 5d2aadbc834393b532d043d6298d6a23b80c2a5c (patch) | |
| tree | dcf139b67179d5bc3ad3ed69e949a1e7c1d18177 /Hotline/Models/FilePreview.swift | |
| parent | a4cbaea0b12b7dd42133b4bd14f1371f1000fcc0 (diff) | |
File downloads now working in macOS client.1.0beta4
Diffstat (limited to 'Hotline/Models/FilePreview.swift')
| -rw-r--r-- | Hotline/Models/FilePreview.swift | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Hotline/Models/FilePreview.swift b/Hotline/Models/FilePreview.swift new file mode 100644 index 0000000..552ccff --- /dev/null +++ b/Hotline/Models/FilePreview.swift @@ -0,0 +1,41 @@ +import SwiftUI + +//struct FilePreview: Identifiable, Hashable { +// let id: UUID +// +// let path: [String] +// let name: String +// +// let type: String +// let creator: String +// let fileSize: UInt +// +// let isFolder: Bool +// let isUnavailable: Bool +// var expanded: Bool = false +// var children: [FileInfo]? = nil +// +// init(hotlineFile: HotlineFile) { +// self.id = UUID() +// self.path = hotlineFile.path +// self.name = hotlineFile.name +// self.type = hotlineFile.type +// 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 = [] +// } +// } +// +// static func == (lhs: FileInfo, rhs: FileInfo) -> Bool { +// return lhs.id == rhs.id +// } +// +// func hash(into hasher: inout Hasher) { +// hasher.combine(self.id) +// } +//} |