1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +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') mixpanel.track('MAIN_FOCUSED')
} }
// the width of the navigation bar when it is folded/collapsed
const foldedNavigationWidth = 44
class Main extends React.Component { class Main extends React.Component {
constructor (props) { constructor (props) {
@@ -193,6 +190,17 @@ class Main extends React.Component {
render () { render () {
let { config } = this.props 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 ( return (
<div <div
className='Main' className='Main'
@@ -261,7 +269,7 @@ class Main extends React.Component {
/> />
</div> </div>
<RealtimeNotification <RealtimeNotification
style={{left: config.isSideNavFolded ? foldedNavigationWidth : this.state.navWidth}} style={{left: notificationBarOffsetLeft}}
/> />
</div> </div>
) )