Commit 1990b3b8 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Only search when search field is accepted

Summary: Saves a bunch of intermediate requests that aren't super useful

Test Plan: Searched a bit, feels nice

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9298
parent 9a9e4b84
......@@ -35,10 +35,8 @@ TextField
searchField.selectAll()
}
}
onTextChanged: {
if (applicationWindow().stack.depth > 0)
searchTimer.running = true
}
onAccepted: currentSearchText = text
Component.onCompleted: forceActiveFocus()
Connections {
......@@ -56,14 +54,4 @@ TextField
searchField.text = ""
}
}
Timer {
id: searchTimer
running: false
repeat: false
interval: 200
onTriggered: {
currentSearchText = parent.text
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment