@@ -102,7 +102,7 @@ public struct DiffableTextField<Style: DiffableTextStyle>: UIViewRepresentable {
102102 @usableFromInline var sidestream = Sidestream ( )
103103
104104 //=--------------------------------------------------------------------=
105- // MARK: Transformations
105+ // MARK: Events
106106 //=--------------------------------------------------------------------=
107107
108108 @inlinable @inline ( never) func setup(
@@ -155,8 +155,16 @@ public struct DiffableTextField<Style: DiffableTextStyle>: UIViewRepresentable {
155155 self . synchronize ( . acyclical)
156156 }
157157
158+ @inlinable @inline ( never) public func textFieldDidBeginEditing( _ view: UITextField ) {
159+ self . synchronize ( [ ] )
160+ }
161+
162+ @inlinable @inline ( never) public func textFieldDidEndEditing( _ view: UITextField ) {
163+ self . synchronize ( [ ] )
164+ }
165+
158166 //=--------------------------------------------------------------------=
159- // MARK: Events
167+ // MARK: Interactions
160168 //=--------------------------------------------------------------------=
161169
162170 @inlinable @inline ( never)
@@ -185,7 +193,7 @@ public struct DiffableTextField<Style: DiffableTextStyle>: UIViewRepresentable {
185193 // Cancellation
186194 //=----------------------------------=
187195 } catch let reason {
188- Brrr . cancellation << Info ( reason)
196+ Brrr . cancellation << reason
189197 }
190198 //=----------------------------------=
191199 // Decline Automatic Insertion
@@ -223,24 +231,12 @@ public struct DiffableTextField<Style: DiffableTextStyle>: UIViewRepresentable {
223231 }
224232 }
225233
226- //=--------------------------------------------------------------------=
227- // MARK: Events
228- //=--------------------------------------------------------------------=
229-
230- @inlinable public func textFieldShouldReturn( _ view: UITextField ) -> Bool {
234+ @inlinable @inline ( never) public func textFieldShouldReturn( _ view: UITextField ) -> Bool {
231235 self . downstream. dismiss ( )
232236 self . sidestream. onSubmit ? ( )
233237 return true
234238 }
235239
236- @inlinable public func textFieldDidBeginEditing( _ view: UITextField ) {
237- self . synchronize ( [ ] )
238- }
239-
240- @inlinable public func textFieldDidEndEditing( _ view: UITextField ) {
241- self . synchronize ( [ ] )
242- }
243-
244240 //=--------------------------------------------------------------------=
245241 // MARK: Synchronization
246242 //=--------------------------------------------------------------------=
@@ -258,11 +254,10 @@ public struct DiffableTextField<Style: DiffableTextStyle>: UIViewRepresentable {
258254 //=------------------------------=
259255 self . push ( update)
260256 //=----------------------------------=
261- // Cyclical
257+ // Unsynchronizable
262258 //=----------------------------------=
263- } catch let cyclical {
264- Brrr . unsynchronizable << Info ( cyclical)
265- Brrr . dismiss << Info ( [ . mark( " cyclical " ) , " view updates are prohibited " ] )
259+ } catch let reason {
260+ Brrr . unsynchronizable << reason
266261 //=------------------------------=
267262 // Dismiss
268263 //=------------------------------=
0 commit comments