mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
Fix notification bar offset in full screen mode
This commit is contained in:
@@ -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>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user