1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-15 15:45:20 -04:00

Fix/clipboard pinned recents dedupe (#2605)

* fix(clipboard): unpin pinned duplicates from history entries

* fix(clipboard): dedupe recents when using pinned entries
This commit is contained in:
jbwfu
2026-06-12 03:05:28 +08:00
committed by GitHub
parent 5a5cc4f4e9
commit 5483303714
6 changed files with 171 additions and 45 deletions
+7 -3
View File
@@ -388,11 +388,15 @@ Singleton {
return "text";
}
function hashedPinnedEntry(entryHash) {
function getPinnedEntryByHash(entryHash) {
if (!entryHash) {
return false;
return null;
}
return pinnedEntries.some(pinnedEntry => pinnedEntry.hash === entryHash);
return internalEntries.find(entry => entry.pinned && entry.hash === entryHash) || null;
}
function hashedPinnedEntry(entryHash) {
return getPinnedEntryByHash(entryHash) !== null;
}
onClipboardAvailableChanged: {