mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
launcher v2: fix some plugin icon handling
This commit is contained in:
@@ -678,8 +678,16 @@ Item {
|
|||||||
|
|
||||||
function transformBuiltInLauncherItem(item, pluginId) {
|
function transformBuiltInLauncherItem(item, pluginId) {
|
||||||
var rawIcon = item.icon || "extension";
|
var rawIcon = item.icon || "extension";
|
||||||
var iconType = detectIconType(rawIcon);
|
|
||||||
var icon = stripIconPrefix(rawIcon);
|
var icon = stripIconPrefix(rawIcon);
|
||||||
|
var iconType = item.iconType;
|
||||||
|
if (!iconType) {
|
||||||
|
if (rawIcon.startsWith("material:"))
|
||||||
|
iconType = "material";
|
||||||
|
else if (rawIcon.startsWith("unicode:"))
|
||||||
|
iconType = "unicode";
|
||||||
|
else
|
||||||
|
iconType = "image";
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: item.action || "",
|
id: item.action || "",
|
||||||
@@ -1186,8 +1194,16 @@ Item {
|
|||||||
|
|
||||||
function transformPluginItem(item, pluginId) {
|
function transformPluginItem(item, pluginId) {
|
||||||
var rawIcon = item.icon || "extension";
|
var rawIcon = item.icon || "extension";
|
||||||
var iconType = item.iconType || detectIconType(rawIcon);
|
|
||||||
var icon = stripIconPrefix(rawIcon);
|
var icon = stripIconPrefix(rawIcon);
|
||||||
|
var iconType = item.iconType;
|
||||||
|
if (!iconType) {
|
||||||
|
if (rawIcon.startsWith("material:"))
|
||||||
|
iconType = "material";
|
||||||
|
else if (rawIcon.startsWith("unicode:"))
|
||||||
|
iconType = "unicode";
|
||||||
|
else
|
||||||
|
iconType = "image";
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: item.id || item.name || "",
|
id: item.id || item.name || "",
|
||||||
|
|||||||
Reference in New Issue
Block a user