Skip to content

Commit

Permalink
Minor syntax improvement to UserSpace
Browse files Browse the repository at this point in the history
  • Loading branch information
zenangst committed May 29, 2024
1 parent 7a349c6 commit 8026388
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions App/Sources/Core/UserSpace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,11 @@ final class UserSpace: @unchecked Sendable {
configurationSubscription = publisher
.sink { [weak self] configuration in
guard let self = self else { return }
Task {
await MainActor.run {
let currentModes = configuration.userModes
.map { UserMode(id: $0.id, name: $0.name, isEnabled: false) }
.sorted(by: { $0.name < $1.name })
self.userModes = currentModes
}
Task { @MainActor in
let currentModes = configuration.userModes
.map { UserMode(id: $0.id, name: $0.name, isEnabled: false) }
.sorted(by: { $0.name < $1.name })
self.userModes = currentModes
}
}
}
Expand Down

0 comments on commit 8026388

Please sign in to comment.