Skip to content

Commit

Permalink
Add opener and PR ID to CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-farre committed Jan 24, 2025
1 parent af97a68 commit a0dd4c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static function onLayoutAddonInit($event)
if (Yii::$app->session->has(MobileAppHelper::SESSION_VAR_HIDE_OPENER)) {
MobileAppHelper::registerHideOpenerScript();
Yii::$app->session->remove(MobileAppHelper::SESSION_VAR_HIDE_OPENER);
} elseif (MobileAppHelper::openerState()) {
} elseif (DeviceDetectorHelper::appOpenerState()) {
MobileAppHelper::registerHideOpenerScript();
}

Expand Down
6 changes: 3 additions & 3 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Changelog

2.1.4 (Unreleased)
-----------------------
- Enh: Add "Open native console" button for the mobile app
- Chg: The minimal HumHub version is now 1.17
- Chg: Use the new `DeviceDetectorHelper` helper instead of `MobileAppHelper`
- Enh #66: Add "Open native console" button for the mobile app
- Chg #67: The minimal HumHub version is now 1.17
- Chg #67: Use the new `DeviceDetectorHelper` helper instead of `MobileAppHelper`

2.1.3 (January 6, 2024)
-----------------------
Expand Down
12 changes: 0 additions & 12 deletions helpers/MobileAppHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,4 @@ private static function sendFlutterMessage($msg): void
{
Yii::$app->view->registerJs('if (window.flutterChannel) { window.flutterChannel.postMessage(\'' . $msg . '\'); }');
}

/**
* True if the mobile app Opener landing page is visible and should be hidden.
*
* @since HumHub mobile app v1.0.124
*/
public static function openerState(): bool
{
return
DeviceDetectorHelper::isAppRequest()
&& Yii::$app->request->headers->get('x-humhub-app-opener-state');
}
}

0 comments on commit a0dd4c4

Please sign in to comment.