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:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user