Skip to content

Commit 1a88752

Browse files
committed
Reverted: parts of previous commit.
1 parent 9d7e298 commit 1a88752

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Sources/DiffableTextKitXUIKit/DiffableTextField.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)