Skip to content

Commit

Permalink
https://github.com/humhub/fcm-push/pull/60#discussion_r1883967828
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-farre committed Dec 13, 2024
1 parent a10b092 commit ba00673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
],
]));
}
}
7 changes: 1 addition & 6 deletions controllers/MobileAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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(
'<script ' . Html::nonce() . '>window.location.href = "%s";</script>',
Yii::$app->request->referrer,
));
return $this->htmlRedirect(Yii::$app->request->referrer);
}
}

0 comments on commit ba00673

Please sign in to comment.