Mobile/filtering: simplify the filter toggle
Simply make it always reset the filter. There's no point remembering the last filter pattern and explicitly setting it, if the last thing we do is to reset this pattern. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
466a0bf758
commit
b0a0e1e374
@ -510,12 +510,7 @@ Kirigami.ScrollablePage {
|
||||
text: qsTr("Filter dives")
|
||||
onTriggered: {
|
||||
rootItem.filterToggle = !rootItem.filterToggle
|
||||
if (rootItem.filterToggle) {
|
||||
diveModel.setFilter(rootItem.filterPattern)
|
||||
} else {
|
||||
diveModel.resetFilter()
|
||||
rootItem.filterPattern = ""
|
||||
}
|
||||
diveModel.resetFilter()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user