forked from aparoksha/adwaita-swift
Improve performance of entry rows
This commit is contained in:
parent
c07b0718f7
commit
5c1ae9e9b1
@ -21,8 +21,9 @@ extension EntryRow {
|
|||||||
appearFunctions.append { storage, _ in
|
appearFunctions.append { storage, _ in
|
||||||
storage.fields[Self.textField] = text
|
storage.fields[Self.textField] = text
|
||||||
storage.notify(name: "text") {
|
storage.notify(name: "text") {
|
||||||
if let binding = storage.fields[Self.textField] as? Binding<String> {
|
let newValue = String(cString: gtk_editable_get_text(storage.pointer))
|
||||||
binding.wrappedValue = .init(cString: gtk_editable_get_text(storage.pointer))
|
if let binding = storage.fields[Self.textField] as? Binding<String>, binding.wrappedValue != newValue {
|
||||||
|
binding.wrappedValue = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user