Add a long-press move to folder to app launcher

This commit is contained in:
James Babcock committed 2026-08-12 19:05:08 -07:00
1 parent d7d12afcaa
commit 495cf0363a
2 files changed
+84 -3

No files matched your search

+13
View File
@@ -87,6 +87,19 @@ export function disbandFolder(folder: string): number {
return moved;
}
/**
* An unused name for a ring-created folder ("New folder", "New folder 2", …).
* Ring input has no text entry, so new folders start with a generated name;
* the assistant's folder tools can regroup the apps under a better one.
*/
export function unusedNewFolderName(): string {
const existing = new Set(Array.from(getFolders().keys()).map((name) => name.toLowerCase()));
for (let i = 1; ; i++) {
const candidate = i === 1 ? "New folder" : `New folder ${i}`;
if (!existing.has(candidate.toLowerCase())) return candidate;
}
}
/**
* Match an existing folder name case-insensitively (so "games" reuses
* "Games" instead of creating a near-duplicate), else the trimmed input.