Update ui.js to not load home, notifcations on componentWillMount
• Update: - ui.js to not load home, notifcations on componentWillMount if not on that page • Todo: - Fix and expand notifications as expected
This commit is contained in:
parent
535e76a02f
commit
0b88db6204
@ -353,7 +353,7 @@ class UI extends PureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentWillMount() {
|
||||||
if (!me) return
|
if (!me) return
|
||||||
|
|
||||||
window.addEventListener('beforeunload', this.handleBeforeUnload, false)
|
window.addEventListener('beforeunload', this.handleBeforeUnload, false)
|
||||||
@ -372,13 +372,16 @@ class UI extends PureComponent {
|
|||||||
window.setTimeout(() => Notification.requestPermission(), 120 * 1000)
|
window.setTimeout(() => Notification.requestPermission(), 120 * 1000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.context.router.route.location.pathname === '/home') {
|
||||||
this.props.dispatch(expandHomeTimeline())
|
this.props.dispatch(expandHomeTimeline())
|
||||||
|
} else if (this.context.router.route.location.pathname === '/notifications') {
|
||||||
this.props.dispatch(expandNotifications())
|
this.props.dispatch(expandNotifications())
|
||||||
this.props.dispatch(initializeNotifications())
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
this.props.dispatch(initializeNotifications())
|
||||||
this.props.dispatch(fetchFilters())
|
}
|
||||||
}, 500)
|
|
||||||
|
componentDidMount() {
|
||||||
// this.hotkeys.__mousetrap__.stopCallback = (e, element) => {
|
// this.hotkeys.__mousetrap__.stopCallback = (e, element) => {
|
||||||
// return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName)
|
// return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName)
|
||||||
// }
|
// }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user