1
0
Fork 0

Merge pull request #3705 from BlueFox4/master

Fixed taglauncher crashing with certain apps installed
master
thyttan 2025-01-04 12:02:31 +01:00 committed by GitHub
commit 6ff96932a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 31 additions and 10 deletions

View File

@ -4,3 +4,4 @@
Add tag 'health' for apps like Heart Rate Monitor Add tag 'health' for apps like Heart Rate Monitor
0.04: Fix remove handler 0.04: Fix remove handler
0.05: Make the "App source not found" warning less buggy 0.05: Make the "App source not found" warning less buggy
0.06: Fixed a crash if an app has no tags (app.tags is undefined)

View File

@ -1,4 +1,4 @@
Launcher Tag Launcher
======== ========
Based on the default launcher but puts all applications in a submenu by their tag. Based on the default launcher but puts all applications in a submenu by their tag.
@ -13,3 +13,18 @@ Settings
- `Vector Font Size` - The size of the font if `Font` is set to `Vector`. Default `10`. - `Vector Font Size` - The size of the font if `Font` is set to `Vector`. Default `10`.
- `Show Clocks` - If set to `No` then clocks won't appear in the app list. Default `Yes`. - `Show Clocks` - If set to `No` then clocks won't appear in the app list. Default `Yes`.
- `Fullscreen` - If set to `Yes` then widgets won't be loaded. Default `No`. - `Fullscreen` - If set to `Yes` then widgets won't be loaded. Default `No`.
Acknowledgements
========
Creator
--------
[nxdefiant](https://github.com/nxdefiant)
Contributors
--------
- [atjn](https://github.com/atjn)
- [BlueFox4](https://github.com/BlueFox4)

View File

@ -48,15 +48,20 @@ if (launchCache.hash!=launchHash) {
.filter(app=>app && app.type=="app" || app.type=="clock" || !app.type) .filter(app=>app && app.type=="app" || app.type=="clock" || !app.type)
.sort((a,b)=>sort(a,b)) .sort((a,b)=>sort(a,b))
.forEach(app => { .forEach(app => {
let appTags = app.tags.split(",") let appTags = [];
.map(tag => tag.trim()) if (!app.tags) {
.map(tag => tag === "tools" ? "tool" : tag) // tool = tools
.filter(tag => Object.keys(tags).includes(tag));
if (appTags.length === 0) {
appTags.push("misc"); appTags.push("misc");
} else if (appTags.length > 1 && appTags.indexOf("tool") >= 0) { } else {
// everything has tag 'tool', unregister when at least one other known tag appTags = app.tags.split(",")
appTags.splice(appTags.indexOf("tool"), 1); .map(tag => tag.trim())
.map(tag => tag === "tools" ? "tool" : tag) // tool = tools
.filter(tag => Object.keys(tags).includes(tag));
if (appTags.length === 0) {
appTags.push("misc");
} else if (appTags.length > 1 && appTags.indexOf("tool") >= 0) {
// everything has tag 'tool', unregister when at least one other known tag
appTags.splice(appTags.indexOf("tool"), 1);
}
} }
appTags.forEach(tag => appsByTag[tag].push(app)); appTags.forEach(tag => appsByTag[tag].push(app));
}); });

View File

@ -2,7 +2,7 @@
"id": "taglaunch", "id": "taglaunch",
"name": "Tag Launcher", "name": "Tag Launcher",
"shortName": "Taglauncher", "shortName": "Taglauncher",
"version": "0.05", "version": "0.06",
"description": "Launcher that puts all applications into submenus based on their tag. With many applications installed this can result in a faster application selection than the linear access of the default launcher.", "description": "Launcher that puts all applications into submenus based on their tag. With many applications installed this can result in a faster application selection than the linear access of the default launcher.",
"readme": "README.md", "readme": "README.md",
"icon": "app.png", "icon": "app.png",