mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-08 06:25:37 -05:00
fix: Load launcher plugin no-trigger settings. (#567)
getPluginTrigger() function only loaded the trigger setting but completely ignored the noTrigger boolean setting. When noTrigger was enabled and saved as: - noTrigger: true - trigger: "" On reboot, the function would load trigger which was "", but since empty string is falsy in the fallback expression, it would revert to plugin.trigger || "!" from the plugin.json manifest, which is "=" for the Calculator plugin.
This commit is contained in:
committed by
GitHub
parent
b7e99c0d2b
commit
2f2020e7e2
@@ -573,6 +573,12 @@ Singleton {
|
||||
function getPluginTrigger(pluginId) {
|
||||
const plugin = getLauncherPlugin(pluginId)
|
||||
if (plugin) {
|
||||
// Check if noTrigger is set (always active mode)
|
||||
const noTrigger = SettingsData.getPluginSetting(pluginId, "noTrigger", false)
|
||||
if (noTrigger) {
|
||||
return ""
|
||||
}
|
||||
// Otherwise load the custom trigger, defaulting to plugin manifest trigger
|
||||
const customTrigger = SettingsData.getPluginSetting(pluginId, "trigger", plugin.trigger || "!")
|
||||
return customTrigger
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user