diff options
Diffstat (limited to 'src/state/models/feed-view.ts')
-rw-r--r-- | src/state/models/feed-view.ts | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 585bbce28..9fd024032 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -61,17 +61,13 @@ export class FeedViewItemModel implements GetFeedView.FeedItem { async toggleLike() { if (this.myState.like) { - await apilib.unlike(this.rootStore.api, this.myState.like) + await apilib.unlike(this.rootStore, this.myState.like) runInAction(() => { this.likeCount-- this.myState.like = undefined }) } else { - const res = await apilib.like( - this.rootStore.api, - 'did:test:alice', - this.uri, - ) + const res = await apilib.like(this.rootStore, this.uri) runInAction(() => { this.likeCount++ this.myState.like = res.uri @@ -81,17 +77,13 @@ export class FeedViewItemModel implements GetFeedView.FeedItem { async toggleRepost() { if (this.myState.repost) { - await apilib.unrepost(this.rootStore.api, this.myState.repost) + await apilib.unrepost(this.rootStore, this.myState.repost) runInAction(() => { this.repostCount-- this.myState.repost = undefined }) } else { - const res = await apilib.repost( - this.rootStore.api, - 'did:test:alice', - this.uri, - ) + const res = await apilib.repost(this.rootStore, this.uri) runInAction(() => { this.repostCount++ this.myState.repost = res.uri |