diff options
| author | Dustin Mierau <dustin@mierau.me> | 2025-11-11 17:14:13 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2025-11-11 17:14:13 -0800 |
| commit | bcc7775dcace8593870e3afc12de21c871114d54 (patch) | |
| tree | 49de707bf6aad0df0a87b01f217232761e2513da /Hotline/State | |
| parent | 86560ac84504f2da63c8fb08505857d8827684d4 (diff) | |
Add confirmation for file/folder delete. Also add New Folder button to files.
Diffstat (limited to 'Hotline/State')
| -rw-r--r-- | Hotline/State/HotlineState.swift | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Hotline/State/HotlineState.swift b/Hotline/State/HotlineState.swift index 7335f37..5d6471c 100644 --- a/Hotline/State/HotlineState.swift +++ b/Hotline/State/HotlineState.swift @@ -835,6 +835,15 @@ class HotlineState: Equatable { return try await client.getFileInfo(name: fileName, path: fullPath) } + + @MainActor + func newFolder(name: String, parentPath: [String]) async throws -> Bool { + guard let client = self.client else { + throw HotlineClientError.notConnected + } + + return try await client.newFolder(name: name, path: parentPath) + } @MainActor func deleteFile(_ fileName: String, path: [String]) async throws -> Bool { |