From b0a0e1e3740232e1d83ed3ad5f46c241d7b4c25c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 20 Oct 2018 12:01:21 -0400 Subject: 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 --- mobile-widgets/qml/DiveList.qml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index d5d85e3a6..489e6b42d 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -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() } } -- cgit v1.2.3-70-g09d2