mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-06 21:48:30 -04:00
qs: large sweep of dead code removals
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
.pragma library
|
||||
|
||||
function findParentFlickable(item) {
|
||||
while (item) {
|
||||
if (item.hasOwnProperty("contentY") && item.hasOwnProperty("contentItem"))
|
||||
return item;
|
||||
item = item.parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function findSettings(item) {
|
||||
while (item) {
|
||||
if (item.saveValue !== undefined && item.loadValue !== undefined)
|
||||
return item;
|
||||
item = item.parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function normalizePinList(value) {
|
||||
if (Array.isArray(value))
|
||||
return value.filter(v => v);
|
||||
if (typeof value === "string" && value.length > 0)
|
||||
return [value];
|
||||
return [];
|
||||
}
|
||||
Reference in New Issue
Block a user