Skip to content

Commit efe2baf

Browse files
authored
Bug fix. #1875 (#1876)
Bug fix. TaskOutputView cleared after a double tap on Clear output button in TaskOutputActionsView
1 parent 8accb3b commit efe2baf

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

CodeEdit/Features/Tasks/Models/CEActiveTask.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,8 @@ class CEActiveTask: ObservableObject, Identifiable, Hashable {
140140
}
141141
}
142142

143-
func clearOutput() async {
144-
await MainActor.run {
145-
output = ""
146-
}
143+
func clearOutput() {
144+
output = ""
147145
}
148146

149147
private func createStatusTaskNotification() {

CodeEdit/Features/UtilityArea/DebugUtility/TaskOutputActionsView.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ struct TaskOutputActionsView: View {
7171
.help("Scroll down to the bottom")
7272

7373
Button {
74-
Task {
75-
await activeTask.clearOutput()
76-
}
74+
activeTask.clearOutput()
7775
} label: {
7876
Image(systemName: "trash")
7977
}

0 commit comments

Comments
 (0)