File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Sources/DiffableTextKitXUIKit Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -282,9 +282,8 @@ public struct DiffableTextField<Style: DiffableTextStyle>: UIViewRepresentable {
282282 //=----------------------------------=
283283 // Value
284284 //=----------------------------------=
285- if self . update. contains ( . value) {
285+ if let _ = self . update. remove ( . value) {
286286 self . upstream. value = context. value
287- self . update. subtract ( . value)
288287 //=------------------------------=
289288 // Reentrance
290289 //=------------------------------=
@@ -293,16 +292,14 @@ public struct DiffableTextField<Style: DiffableTextStyle>: UIViewRepresentable {
293292 //=----------------------------------=
294293 // Text
295294 //=----------------------------------=
296- if self . update. contains ( . text) {
295+ if let _ = self . update. remove ( . text) {
297296 self . downstream. text = context. text
298- self . update. subtract ( . text)
299297 }
300298 //=----------------------------------=
301299 // Selection
302300 //=----------------------------------=
303- if self . update. contains ( . selection) {
301+ if let _ = self . update. remove ( . selection) {
304302 self . downstream. selection = context. selection ( )
305- self . update. subtract ( . selection)
306303 }
307304 }
308305 }
You can’t perform that action at this time.
0 commit comments