1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Fix notification bar offset in full screen mode

This commit is contained in:
Cristian Beskid
2017-09-25 23:08:12 +02:00
parent 000cf2a864
commit ea81b0d414

View File

@@ -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 (
<div
className='Main'
@@ -261,7 +269,7 @@ class Main extends React.Component {
/>
</div>
<RealtimeNotification
style={{left: config.isSideNavFolded ? foldedNavigationWidth : this.state.navWidth}}
style={{left: notificationBarOffsetLeft}}
/>
</div>
)