aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Views/FileListView.swift
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2023-12-05 17:41:22 -0800
committerDustin Mierau <dustin@mierau.me>2023-12-05 17:41:22 -0800
commit06a2166415bca7e5fe32eac505859bdd690ab8e0 (patch)
treed47d4ea30766a8e382deafa607a7abe66f47f9ab /Hotline/Views/FileListView.swift
parentb99219f16792be4a06a89f1f32a59f0bf97bba68 (diff)
Some styling work. Files showing. Message board tweaks.
Diffstat (limited to 'Hotline/Views/FileListView.swift')
-rw-r--r--Hotline/Views/FileListView.swift28
1 files changed, 16 insertions, 12 deletions
diff --git a/Hotline/Views/FileListView.swift b/Hotline/Views/FileListView.swift
index 852fce4..a315757 100644
--- a/Hotline/Views/FileListView.swift
+++ b/Hotline/Views/FileListView.swift
@@ -1,22 +1,26 @@
import SwiftUI
struct FileListView: View {
- var item: HotlineFile
+ @State var files: [HotlineFile]
var body: some View {
- List {
- ForEach(item.files) { f in
- if f.isFolder {
- DisclosureGroup(f.name, isExpanded: false)
- }
- else {
- Text("HELLO")
- }
- }
- }
+ Text("HI")
+// @Bindable var fls = files
+// List {
+// ForEach($fls, id: \.self) { f in
+// if f.isFolder {
+// DisclosureGroup(f.name, isExpanded: false)
+// }
+// else {
+// Text("HELLO")
+// }
+// }
+// }
}
}
#Preview {
- FileListView(item: HotlineFile(type: "fldr", creator: "", fileSize: 0, fileName: "Folder"))
+ FileListView(files: [
+ HotlineFile(type: "fldr", creator: "", fileSize: 0, fileName: "Folder")
+ ])
}