diff options
Diffstat (limited to 'src/state/models/feed-view.ts')
-rw-r--r-- | src/state/models/feed-view.ts | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 5f2b9721e..c39daf874 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -6,7 +6,6 @@ import { AppBskyFeedGetAuthorFeed as GetAuthorFeed, } from '@atproto/api' type FeedViewPost = AppBskyFeedFeedViewPost.Main -type ReasonTrend = AppBskyFeedFeedViewPost.ReasonTrend type ReasonRepost = AppBskyFeedFeedViewPost.ReasonRepost type PostView = AppBskyFeedPost.View import {AtUri} from '../../third-party/uri' @@ -94,12 +93,6 @@ export class FeedItemModel { } } - get reasonTrend(): ReasonTrend | undefined { - if (this.reason?.$type === 'app.bsky.feed.feedViewPost#reasonTrend') { - return this.reason as ReasonTrend - } - } - async toggleUpvote() { const wasUpvoted = !!this.post.viewer.upvote const wasDownvoted = !!this.post.viewer.downvote @@ -494,10 +487,9 @@ export class FeedModel { private _updateAll(res: GetTimeline.Response | GetAuthorFeed.Response) { for (const item of res.data.feed) { const existingItem = this.feed.find( - // HACK: need to find the reposts and trends item, so we have to check for that -prf + // HACK: need to find the reposts' item, so we have to check for that -prf item2 => item.post.uri === item2.post.uri && - item.reason?.$trend === item2.reason?.$trend && // @ts-ignore todo item.reason?.by?.did === item2.reason?.by?.did, ) |