1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-10 05:03:28 -04:00

fix(clipboard): exit saved filter when pinned entries are empty (#2604)

This commit is contained in:
jbwfu
2026-06-09 11:54:06 +08:00
committed by GitHub
parent 9111e4809d
commit 38af56c6fd
2 changed files with 10 additions and 1 deletions
@@ -50,7 +50,7 @@ Item {
iconSize: Theme.iconSize - 4
iconColor: header.activeTab === "saved" ? Theme.primary : Theme.surfaceText
backgroundColor: header.activeTab === "saved" ? Theme.primarySelected : "transparent"
visible: header.pinnedCount > 0
visible: header.pinnedCount > 0 || header.activeTab === "saved"
tooltipText: header.activeTab === "saved" ? I18n.tr("Recent") : I18n.tr("Saved")
onClicked: tabChanged(header.activeTab === "saved" ? "recents" : "saved")
}
@@ -36,9 +36,18 @@ FocusScope {
signal instantCloseRequested
onActiveTabChanged: {
if (activeTab === "saved" && pinnedCount === 0) {
activeTab = "recents";
return;
}
ClipboardService.selectedIndex = 0;
ClipboardService.keyboardNavigationActive = false;
}
onPinnedCountChanged: {
if (activeTab === "saved" && pinnedCount === 0) {
activeTab = "recents";
}
}
onSearchTextChanged: ClipboardService.searchText = searchText
function hide() {