mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-29 13:03:11 +00:00
Add a long-press move to folder to app launcher
This commit is contained in:
1 parent
662aca0c2f
commit
1b4844b1ef
2 files changed
+84
-3
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user