From 55b1d6e960e136426051647d419fb763b85a826d Mon Sep 17 00:00:00 2001 From: Boy132 Date: Fri, 4 Jul 2025 09:23:16 +0200 Subject: [PATCH] fix load behaviour --- app/Models/Plugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Plugin.php b/app/Models/Plugin.php index c0175bb98..2f5160757 100644 --- a/app/Models/Plugin.php +++ b/app/Models/Plugin.php @@ -114,12 +114,12 @@ class Plugin extends Model implements HasPluginSettings public function shouldLoad(): bool { - return $this->isEnabled() && $this->isInstalled() && $this->isCompatible(); + return !$this->isDisabled() && $this->isInstalled() && !$this->isIncompatible(); } public function shouldLoadPanel(string $panelId): bool { - return $this->shouldLoad() && ($this->panels === null || in_array($panelId, explode(',', $this->panels))); + return !$this->isDisabled() && $this->isInstalled() && !$this->isIncompatible() && ($this->panels === null || in_array($panelId, explode(',', $this->panels))); } public function canEnable(): bool @@ -129,7 +129,7 @@ class Plugin extends Model implements HasPluginSettings public function canDisable(): bool { - return $this->shouldLoad(); + return $this->isEnabled() && $this->isInstalled() && $this->isCompatible(); } public function isEnabled(): bool