From ba00673d96591a7cad34817ffda24505664320be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Farr=C3=A9?= Date: Fri, 13 Dec 2024 16:38:52 +0000 Subject: [PATCH] https://github.com/humhub/fcm-push/pull/60#discussion_r1883967828 --- Events.php | 3 +++ controllers/MobileAppController.php | 7 +------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Events.php b/Events.php index 6ab26bc..b97c702 100644 --- a/Events.php +++ b/Events.php @@ -169,6 +169,9 @@ public static function onAccountTopMenuInit(Event $event) 'sortOrder' => 699, // Just before "Logout" 'isActive' => true, 'isVisible' => true, + 'htmlOptions' => [ + 'data-pjax' => '0', // Force full page refresh to trigger the onLayoutAddonInit event + ], ])); } } diff --git a/controllers/MobileAppController.php b/controllers/MobileAppController.php index 0fae695..2c8a16b 100644 --- a/controllers/MobileAppController.php +++ b/controllers/MobileAppController.php @@ -3,7 +3,6 @@ namespace humhub\modules\fcmPush\controllers; use humhub\components\Controller; -use humhub\libs\Html; use humhub\modules\fcmPush\helpers\MobileAppHelper; use Yii; @@ -15,10 +14,6 @@ public function actionInstanceOpener() Yii::$app->session->set(MobileAppHelper::SESSION_VAR_SHOW_OPENER, 1); // Stay on the same page, because when we come back from the mobile app to this instance - // Force full page refresh to trigger the onLayoutAddonInit event - return $this->renderContent(sprintf( - '', - Yii::$app->request->referrer, - )); + return $this->htmlRedirect(Yii::$app->request->referrer); } }