summaryrefslogtreecommitdiff
path: root/src/client/components
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-01-31 15:45:19 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-01-31 15:45:19 +0900
commita774767676bd49f104868c69c1b879b367aa87b9 (patch)
tree603a6c58aa83c598618eb87a11f8fc49194402d1 /src/client/components
parentMerge branch 'develop' of https://github.com/syuilo/misskey into develop (diff)
downloadmisskey-a774767676bd49f104868c69c1b879b367aa87b9.tar.gz
misskey-a774767676bd49f104868c69c1b879b367aa87b9.tar.bz2
misskey-a774767676bd49f104868c69c1b879b367aa87b9.zip
Fix bug
Diffstat (limited to 'src/client/components')
-rw-r--r--src/client/components/follow-button.vue13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/components/follow-button.vue b/src/client/components/follow-button.vue
index 6ebe9db9e6..23cb0cd945 100644
--- a/src/client/components/follow-button.vue
+++ b/src/client/components/follow-button.vue
@@ -3,6 +3,7 @@
:class="{ wait, active: isFollowing || hasPendingFollowRequestFromYou, full }"
@click="onClick"
:disabled="wait"
+ v-if="isFollowing != null"
>
<template v-if="!wait">
<template v-if="hasPendingFollowRequestFromYou && user.isLocked">
@@ -57,6 +58,18 @@ export default Vue.extend({
};
},
+ created() {
+ // 渡されたユーザー情報が不完全な場合
+ if (this.user.isFollowing == null) {
+ this.$root.api('users/show', {
+ userId: this.user.id
+ }).then(u => {
+ this.isFollowing = u.isFollowing;
+ this.hasPendingFollowRequestFromYou = u.hasPendingFollowRequestFromYou;
+ });
+ }
+ },
+
mounted() {
this.connection = this.$root.stream.useSharedConnection('main');