diff --git a/js/forum/src/components/NotificationList.js b/js/forum/src/components/NotificationList.js index fae4c430a..0b1b96679 100644 --- a/js/forum/src/components/NotificationList.js +++ b/js/forum/src/components/NotificationList.js @@ -18,8 +18,6 @@ export default class NotificationList extends Component { * @type {Boolean} */ this.loading = false; - - this.load(); } view() { diff --git a/js/forum/src/components/NotificationsDropdown.js b/js/forum/src/components/NotificationsDropdown.js index d009e7fe8..03fdefbfd 100644 --- a/js/forum/src/components/NotificationsDropdown.js +++ b/js/forum/src/components/NotificationsDropdown.js @@ -12,6 +12,8 @@ export default class NotificationsDropdown extends Component { * @type {Boolean} */ this.showing = false; + + this.list = new NotificationList(); } view() { @@ -28,7 +30,7 @@ export default class NotificationsDropdown extends Component { {app.trans('core.notifications')}
- {this.showing ? NotificationList.component() : ''} + {this.showing ? this.list.render() : ''}
); @@ -39,6 +41,7 @@ export default class NotificationsDropdown extends Component { m.route(app.route('notifications')); } else { this.showing = true; + this.list.load(); } } diff --git a/js/forum/src/components/NotificationsPage.js b/js/forum/src/components/NotificationsPage.js index dc7ea02d8..71a77f12a 100644 --- a/js/forum/src/components/NotificationsPage.js +++ b/js/forum/src/components/NotificationsPage.js @@ -13,9 +13,12 @@ export default class NotificationsPage extends Component { app.history.push('notifications'); app.drawer.hide(); app.modal.close(); + + this.list = new NotificationList(); + this.list.load(); } view() { - return
{NotificationList.component()}
; + return
{this.list.render()}
; } }