diff options
| author | Henry Jameson <me@hjkos.com> | 2018-12-20 09:17:59 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-12-20 09:17:59 +0300 |
| commit | 957b2a6f7ef8ca381fc44b79a17639e400407b67 (patch) | |
| tree | a0eb359a268b243f34b33babf72ba4f5fc317645 /src/modules/users.js | |
| parent | d0b47488fb69b2b8449fa73e8d94e2cdcc9adda8 (diff) | |
simplified some code, made it possible to unregister serviceworker altogether
Diffstat (limited to 'src/modules/users.js')
| -rw-r--r-- | src/modules/users.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/users.js b/src/modules/users.js index 13d3f26e..2ea0919e 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -1,7 +1,7 @@ import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js' import { compact, map, each, merge } from 'lodash' import { set } from 'vue' -import registerPushNotifications from '../services/push/push.js' +import { registerPushNotifications, unregisterPushNotifications } from '../services/push/push.js' import oauthApi from '../services/new_api/oauth' import { humanizeErrors } from './errors' @@ -116,6 +116,9 @@ const users = { registerPushNotifications(isEnabled, vapidPublicKey, token) }, + unregisterPushNotifications (store) { + unregisterPushNotifications() + }, addNewStatuses (store, { statuses }) { const users = map(statuses, 'user') const retweetedUsers = compact(map(statuses, 'retweeted_status.user')) |
