Skip to content
This repository was archived by the owner on Feb 5, 2023. It is now read-only.

Commit d103062

Browse files
committed
fix: update followers counts
1 parent 3e4d965 commit d103062

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/views/Home.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,6 @@ export default class Home extends Vue {
315315
this.rss3Profile.bio = profile?.bio || '';
316316
this.rss3Profile.address = this.ethAddress;
317317
318-
this.rss3Relations.followers = (await this.rss3?.backlinks.get(this.ethAddress, 'following')) || [];
319-
this.rss3Relations.followings = (await this.rss3?.links.get(this.ethAddress, 'following'))?.list || [];
320-
321318
if (data) {
322319
this.accounts.push({
323320
platform: 'Ethereum',
@@ -419,8 +416,13 @@ export default class Home extends Vue {
419416
if (RSS3.isValidRSS3()) {
420417
if (this.isFollowing) {
421418
await this.unfollow();
419+
this.rss3Relations.followers.splice(
420+
this.rss3Relations.followers.indexOf((<IRSS3>this.rss3).account.address),
421+
1,
422+
);
422423
} else {
423424
await this.follow();
425+
this.rss3Relations.followers.push((<IRSS3>this.rss3).account.address);
424426
}
425427
await (<IRSS3>this.rss3).files.sync();
426428
} else {

0 commit comments

Comments
 (0)