Skip to content

Commit b2b6bf0

Browse files
committed
Make Xcode active when cancelling prompt to code
1 parent 350a91d commit b2b6bf0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Core/Sources/SuggestionWidget/FeatureReducers/PromptToCodeGroup.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import ComposableArchitecture
22
import Foundation
33
import PromptToCodeService
44
import SuggestionModel
5+
import Environment
56

67
public struct PromptToCodeGroup: ReducerProtocol {
78
public struct State: Equatable {
@@ -130,7 +131,9 @@ public struct PromptToCodeGroup: ReducerProtocol {
130131
switch action {
131132
case .cancelButtonTapped:
132133
state.promptToCodes.remove(id: id)
133-
return .none
134+
return .run { _ in
135+
try await Environment.makeXcodeActive()
136+
}
134137
default:
135138
return .none
136139
}

0 commit comments

Comments
 (0)