mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-10 13:13:29 -04:00
fix(clipboard): exit saved filter when pinned entries are empty (#2604)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user