diff options
| author | dave <starpumadev@gmail.com> | 2019-02-27 14:38:10 -0500 |
|---|---|---|
| committer | dave <starpumadev@gmail.com> | 2019-02-27 14:38:10 -0500 |
| commit | 7c6446a9dea2a221da643414e87a97d17336215f (patch) | |
| tree | 54e6dc674b03cd934b065b95275797f261b59f4b /src/components/nav_panel/nav_panel.js | |
| parent | 058238c3c631520d052327fcab47c997dfe23151 (diff) | |
#388: get follow request on a real-time basis
Diffstat (limited to 'src/components/nav_panel/nav_panel.js')
| -rw-r--r-- | src/components/nav_panel/nav_panel.js | 13 |
1 files changed, 13 insertions, 0 deletions
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 } } } |
