This commit is contained in:
syuilo 2020-01-31 15:45:19 +09:00
parent 5f09e619f8
commit 44cfe9b322

View File

@ -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');