File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,9 @@ struct WebSocket: ReducerProtocol {
111111 . cancellable ( id: WebSocketID . self)
112112
113113 case . sendResponse( didSucceed: false ) :
114- state. alert = AlertState ( title: TextState ( " Could not send socket message. Connect to the server first, and try again. " ) )
114+ state. alert = AlertState (
115+ title: TextState (
116+ " Could not send socket message. Connect to the server first, and try again. " ) )
115117 return . none
116118
117119 case . sendResponse( didSucceed: true ) :
@@ -145,10 +147,10 @@ struct WebSocketView: View {
145147 VStack ( alignment: . leading) {
146148 Button (
147149 viewStore. connectivityState == . connected
148- ? " Disconnect "
149- : viewStore. connectivityState == . disconnected
150- ? " Connect "
151- : " Connecting... "
150+ ? " Disconnect "
151+ : viewStore. connectivityState == . disconnected
152+ ? " Connect "
153+ : " Connecting... "
152154 ) {
153155 viewStore. send ( . connectButtonTapped)
154156 }
@@ -175,8 +177,8 @@ struct WebSocketView: View {
175177 Text ( " Status: \( viewStore. connectivityState. rawValue) " )
176178 . foregroundStyle ( . secondary)
177179 Text ( viewStore. receivedMessages. reversed ( ) . joined ( separator: " \n " ) )
178- } header: {
179- Text ( " Received messages " )
180+ } header: {
181+ Text ( " Received messages " )
180182 }
181183 }
182184 . alert ( self . store. scope ( state: \. alert) , dismiss: . alertDismissed)
Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ final class WebSocketTests: XCTestCase {
9191 $0. messageToSend = " "
9292 }
9393 await store. receive ( . sendResponse( didSucceed: false ) ) {
94- $0. alert = AlertState ( title: TextState ( " Could not send socket message. Connect to the server first, and try again. " ) )
94+ $0. alert = AlertState (
95+ title: TextState (
96+ " Could not send socket message. Connect to the server first, and try again. " ) )
9597 }
9698
9799 // Disconnect from the socket
You can’t perform that action at this time.
0 commit comments