chore: speedup channel switching
Correctly clear the chat input We enable/disable the chat input on various occasions (switching channels, communities, checking for the person being a contact, etc.). When we do so, we clear the text of the input which causes all sorts of internal handlers to get fired, namely the `onTextChanged` part which parses the text, emojis etc... which is very time consuming. More fixes here in the followup commits; but by using `clear()` it's much faster, resets correctly the internal state and also doesn't fire when the input had been empty already before. Found with QML profiler
This commit is contained in:
parent
6385afebaf
commit
5dbc08dca3
|
@ -1342,7 +1342,7 @@ Rectangle {
|
|||
|
||||
onEnabledChanged: {
|
||||
if (!enabled) {
|
||||
text = ""
|
||||
clear()
|
||||
control.hideExtendedArea()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue