Skip to content

fix: fix panic deleting file sync session via right click #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Coder-Desktop/.swiftformat
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--selfrequired log,info,error,debug,critical,fault
--exclude **.pb.swift,**.grpc.swift
--condassignment always
--condassignment always
--disable unusedArguments
2 changes: 2 additions & 0 deletions Coder-Desktop/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ disabled_rules:
- trailing_comma
- blanket_disable_command # Used by Protobuf
- opening_brace # Handled by SwiftFormat
opt_in_rules:
- unused_parameter
type_name:
allowed_symbols: "_"
identifier_name:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ struct FileSyncConfig<VPN: VPNService, FS: FileSyncDaemon>: View {
}

// TODO: Support selecting & deleting multiple sessions at once
func delete(session _: FileSyncSession) async {
func delete(session: FileSyncSession) async {
loading = true
defer { loading = false }
do throws(DaemonError) {
try await fileSync.deleteSessions(ids: [selection!])
try await fileSync.deleteSessions(ids: [session.id])
} catch {
actionError = error
}
Expand Down
Loading