mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 12:52:06 -04:00
plugins: add plugin state helpers
This commit is contained in:
@@ -147,6 +147,24 @@ Item {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
function saveState(key, value) {
|
||||
if (!pluginService)
|
||||
return;
|
||||
if (pluginService.savePluginState)
|
||||
pluginService.savePluginState(pluginId, key, value);
|
||||
}
|
||||
|
||||
function loadState(key, defaultValue) {
|
||||
if (pluginService && pluginService.loadPluginState)
|
||||
return pluginService.loadPluginState(pluginId, key, defaultValue);
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
function clearState() {
|
||||
if (pluginService && pluginService.clearPluginState)
|
||||
pluginService.clearPluginState(pluginId);
|
||||
}
|
||||
|
||||
function findFlickable(item) {
|
||||
var current = item?.parent;
|
||||
while (current) {
|
||||
|
||||
Reference in New Issue
Block a user