mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 04:09:15 -04:00
feat(Clipboard-Bar-Hist): Add search/filter to saved clipboard entries & animation states (#2464)
* Fix gaps and overlaps when filtering clipboard history * feat(Clipboard-Bar-Hist): Add search/filter to saved clipboard entries as well. Change title on toggle between recent/saved. * keep Pinned/Saved icon highlighted when selected * add back filter animations * Implement snap state for list views based on animation settings --------- Co-authored-by: purian23 <purian23@gmail.com>
This commit is contained in:
@@ -68,15 +68,17 @@ Singleton {
|
||||
|
||||
clipboardEntries = filtered;
|
||||
unpinnedEntries = filtered.filter(e => !e.pinned);
|
||||
pinnedEntries = filtered.filter(e => e.pinned);
|
||||
totalCount = clipboardEntries.length;
|
||||
|
||||
if (unpinnedEntries.length === 0) {
|
||||
const activeCount = Math.max(unpinnedEntries.length, pinnedEntries.length);
|
||||
if (activeCount === 0) {
|
||||
keyboardNavigationActive = false;
|
||||
selectedIndex = 0;
|
||||
return;
|
||||
}
|
||||
if (selectedIndex >= unpinnedEntries.length) {
|
||||
selectedIndex = unpinnedEntries.length - 1;
|
||||
if (selectedIndex >= activeCount) {
|
||||
selectedIndex = activeCount - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user