From d1030628db68157f702739384205d4e842612f97 Mon Sep 17 00:00:00 2001 From: Nya Candy Date: Tue, 7 Sep 2021 14:50:35 +0800 Subject: [PATCH] fix: update followers counts --- src/views/Home.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/Home.vue b/src/views/Home.vue index 98beac4..f9a8aec 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -315,9 +315,6 @@ export default class Home extends Vue { this.rss3Profile.bio = profile?.bio || ''; this.rss3Profile.address = this.ethAddress; - this.rss3Relations.followers = (await this.rss3?.backlinks.get(this.ethAddress, 'following')) || []; - this.rss3Relations.followings = (await this.rss3?.links.get(this.ethAddress, 'following'))?.list || []; - if (data) { this.accounts.push({ platform: 'Ethereum', @@ -419,8 +416,13 @@ export default class Home extends Vue { if (RSS3.isValidRSS3()) { if (this.isFollowing) { await this.unfollow(); + this.rss3Relations.followers.splice( + this.rss3Relations.followers.indexOf((this.rss3).account.address), + 1, + ); } else { await this.follow(); + this.rss3Relations.followers.push((this.rss3).account.address); } await (this.rss3).files.sync(); } else {