From ea81b0d414e34780eb74dbcfa0498465d0859a36 Mon Sep 17 00:00:00 2001 From: Cristian Beskid Date: Mon, 25 Sep 2017 23:08:12 +0200 Subject: [PATCH] Fix notification bar offset in full screen mode --- browser/main/Main.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/browser/main/Main.js b/browser/main/Main.js index d2e5e630..2868e6a8 100644 --- a/browser/main/Main.js +++ b/browser/main/Main.js @@ -20,9 +20,6 @@ function focused () { mixpanel.track('MAIN_FOCUSED') } -// the width of the navigation bar when it is folded/collapsed -const foldedNavigationWidth = 44 - class Main extends React.Component { constructor (props) { @@ -193,6 +190,17 @@ class Main extends React.Component { render () { let { config } = this.props + // the width of the navigation bar when it is folded/collapsed + const foldedNavigationWidth = 44 + let notificationBarOffsetLeft + if (this.state.fullScreen) { + notificationBarOffsetLeft = 0 + } else if (config.isSideNavFolded) { + notificationBarOffsetLeft = foldedNavigationWidth + } else { + notificationBarOffsetLeft = this.state.navWidth + } + return (
)