From 7c6446a9dea2a221da643414e87a97d17336215f Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 27 Feb 2019 14:38:10 -0500 Subject: #388: get follow request on a real-time basis --- src/components/nav_panel/nav_panel.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/components/nav_panel/nav_panel.js') diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js index ea5d7ea4..c4034417 100644 --- a/src/components/nav_panel/nav_panel.js +++ b/src/components/nav_panel/nav_panel.js @@ -1,10 +1,23 @@ +import requestFetcher from '../../services/notifications_fetcher/request_fetcher.service.js' + const NavPanel = { + created () { + if (this.currentUser && this.currentUser.locked) { + const store = this.$store + const credentials = store.state.users.currentUser.credentials + + requestFetcher.startFetching({ store, credentials }) + } + }, computed: { currentUser () { return this.$store.state.users.currentUser }, chat () { return this.$store.state.chat.channel + }, + followRequestCount () { + return this.$store.state.api.followRequests.length } } } -- cgit v1.2.3-70-g09d2