diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-03-01 18:03:30 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-03-01 18:03:30 +0000 |
| commit | 53e104dc32080965a5a28ec37975b0c229a7d083 (patch) | |
| tree | 8247646306bd1279b3464f7d3387ec12371ba94f /src/components/nav_panel/nav_panel.js | |
| parent | bbe4f3e3af54bfcb6f53bc57f66f790f4163bfb0 (diff) | |
| parent | cccf33d6ddc48038e643e651bd4cddc3355dbf18 (diff) | |
Merge branch 'issue-388-request-count-broken' into 'develop'
#388: get follow request on a real-time basis
Closes #388
See merge request pleroma/pleroma-fe!619
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..aa3f7605 100644 --- a/src/components/nav_panel/nav_panel.js +++ b/src/components/nav_panel/nav_panel.js @@ -1,10 +1,23 @@ +import followRequestFetcher from '../../services/follow_request_fetcher/follow_request_fetcher.service' + const NavPanel = { + created () { + if (this.currentUser && this.currentUser.locked) { + const store = this.$store + const credentials = store.state.users.currentUser.credentials + + followRequestFetcher.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 } } } |
