diff options
author | Kushal Pandya <kushal@gitlab.com> | 2018-05-02 12:54:02 +0300 |
---|---|---|
committer | Kushal Pandya <kushal@gitlab.com> | 2018-05-02 12:54:02 +0300 |
commit | aa0a35a867ed2094da60042062e8f3d6000e3952 (patch) | |
tree | 61d075c222a08ae7fd5b8881f70556bc1f9503dd /app/assets/javascripts/sidebar | |
parent | de3194bf897540aae2187abf1ce56667f2889292 (diff) |
Consume `toggleSubscription` event directly from Subscriptions component
Diffstat (limited to 'app/assets/javascripts/sidebar')
-rw-r--r-- | app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions.vue | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions.vue b/app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions.vue index 3e8cc7a6630..385717e7c1e 100644 --- a/app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions.vue +++ b/app/assets/javascripts/sidebar/components/subscriptions/sidebar_subscriptions.vue @@ -1,6 +1,5 @@ <script> import Store from '../../stores/sidebar_store'; -import eventHub from '../../event_hub'; import Flash from '../../../flash'; import { __ } from '../../../locale'; import subscriptions from './subscriptions.vue'; @@ -20,12 +19,6 @@ export default { store: new Store(), }; }, - created() { - eventHub.$on('toggleSubscription', this.onToggleSubscription); - }, - beforeDestroy() { - eventHub.$off('toggleSubscription', this.onToggleSubscription); - }, methods: { onToggleSubscription() { this.mediator.toggleSubscription() @@ -42,6 +35,7 @@ export default { <subscriptions :loading="store.isFetching.subscriptions" :subscribed="store.subscribed" + @toggleSubscription="onToggleSubscription" /> </div> </template> |