Commit 0b88db62 authored by mgabdev's avatar mgabdev

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
parent 535e76a0
......@@ -353,7 +353,7 @@ class UI extends PureComponent {
}
}
componentDidMount() {
componentWillMount() {
if (!me) return
window.addEventListener('beforeunload', this.handleBeforeUnload, false)
......@@ -372,13 +372,16 @@ class UI extends PureComponent {
window.setTimeout(() => Notification.requestPermission(), 120 * 1000)
}
if (this.context.router.route.location.pathname === '/home') {
this.props.dispatch(expandHomeTimeline())
} else if (this.context.router.route.location.pathname === '/notifications') {
this.props.dispatch(expandNotifications())
}
this.props.dispatch(initializeNotifications())
}
setTimeout(() => {
this.props.dispatch(fetchFilters())
}, 500)
componentDidMount() {
// this.hotkeys.__mousetrap__.stopCallback = (e, element) => {
// return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName)
// }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment