Fixes opening menu if menu is not present (when one isnt logged in)
@@ -25,8 +25,8 @@ function genTopnavConf() {
<nav class="topnav">
<div class="topnav__logo clickable">
<img src="skin/{{self.themeName}}/images/logo.svg" class="topnav__logo__icon hide-in-responsive" ng-click="self.router__stateGoDefault()">
- <span class="topnav__logo__menuicon show-in-responsive" ng-click="self.view__toggleMenu()"></span>
- <img src="skin/{{self.themeName}}/images/logo.svg" class="topnav__logo__icon show-in-responsive" ng-click="self.view__toggleMenu()">
+ <span class="topnav__logo__menuicon show-in-responsive" ng-if="self.loggedIn" ng-click="self.menuAction()"></span>
+ <img src="skin/{{self.themeName}}/images/logo.svg" class="topnav__logo__icon show-in-responsive" ng-click="self.menuAction()">
</div>
<div class="topnav__title">
<span class="topnav__app-title hide-in-responsive" ng-click="self.router__stateGoDefault()">
@@ -87,6 +87,14 @@ function genTopnavConf() {
);
}
+ menuAction() {
+ if (this.loggedIn) {
+ this.view__toggleMenu();
+ } else {
+ this.router__stateGoDefault();
+ }
+ }
+
ensureUnreadMessagesAreLoaded(connectionsToCrawl) {
delay(0).then(() => {
const MESSAGECOUNT = 10;
