1
0
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:
Bruno Cesar Rocha
2025-10-27 13:55:15 +00:00
committed by GitHub
parent b7e99c0d2b
commit 2f2020e7e2

View File

@@ -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
}