aboutsummaryrefslogtreecommitdiff
path: root/src/components/retweet_button
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/retweet_button')
-rw-r--r--src/components/retweet_button/retweet_button.js3
-rw-r--r--src/components/retweet_button/retweet_button.vue2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/components/retweet_button/retweet_button.js b/src/components/retweet_button/retweet_button.js
index 42da2531..e7318dc5 100644
--- a/src/components/retweet_button/retweet_button.js
+++ b/src/components/retweet_button/retweet_button.js
@@ -2,6 +2,9 @@ const RetweetButton = {
props: [ 'status' ],
methods: {
retweet () {
+ if (!this.status.repeated) {
+ this.$store.dispatch('retweet', {id: this.status.id})
+ }
}
},
computed: {
diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue
index ed5cb935..ec94356a 100644
--- a/src/components/retweet_button/retweet_button.vue
+++ b/src/components/retweet_button/retweet_button.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <i :class='classes' class='icon-retweet fa' v-on:click.prevent=''></i>
+ <i :class='classes' class='icon-retweet fa' v-on:click.prevent='retweet()'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
</div>
</template>