Skip to content

Commit

Permalink
fix: Adjust the logic of the search box clear button function
Browse files Browse the repository at this point in the history
   Adjust the logic of the search box clear button function
   1.when user clicked clear button, back to previous view.

Log: Adjust the logic of the search box clear button function
Bug: https://pms.uniontech.com/bug-view-168261.html
  • Loading branch information
starhcq committed Jul 24, 2024
1 parent 4ec01eb commit a1d4f87
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/qml/AlbumTitle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,17 @@ TitleBar {
executeSearch(false)
}

// 点击清除按钮,从搜索视图返回到前一视图页
Connections {
target: searchEdit.clearButton.item
function onClicked() {
if (searchEdit.beforeView !== -1 && GStatus.currentViewType === Album.Types.ViewSearchResult)
GStatus.currentViewType = searchEdit.beforeView
}
}

function executeSearch(bForce) {
beforeView = -1
if(GStatus.currentViewType !== Album.Types.ViewSearchResult) {
beforeView = GStatus.currentViewType
}
Expand Down

0 comments on commit a1d4f87

Please sign in to comment.