Remove scene-related code from posts feed
This commit is contained in:
@@ -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'
|
||||
@@ -93,12 +92,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
|
||||
@@ -492,10 +485,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,
|
||||
)
|
||||
|
||||
@@ -146,23 +146,6 @@ export const FeedItem = observer(function ({
|
||||
</Text>
|
||||
</Link>
|
||||
)}
|
||||
{item.reasonTrend && (
|
||||
<Link
|
||||
style={styles.includeReason}
|
||||
href={`/profile/${item.reasonTrend.by.handle}`}
|
||||
title={
|
||||
item.reasonTrend.by.displayName || item.reasonTrend.by.handle
|
||||
}>
|
||||
<FontAwesomeIcon
|
||||
icon="arrow-trend-up"
|
||||
style={styles.includeReasonIcon}
|
||||
/>
|
||||
<Text type="overline2" style={{color: pal.colors.actionLabel}}>
|
||||
Trending with{' '}
|
||||
{item.reasonTrend.by.displayName || item.reasonTrend.by.handle}
|
||||
</Text>
|
||||
</Link>
|
||||
)}
|
||||
<View style={styles.layout}>
|
||||
<View style={styles.layoutAvi}>
|
||||
<Link href={authorHref} title={item.post.author.handle}>
|
||||
|
||||
@@ -12,7 +12,6 @@ import {faArrowRightFromBracket} from '@fortawesome/free-solid-svg-icons'
|
||||
import {faArrowUpFromBracket} from '@fortawesome/free-solid-svg-icons/faArrowUpFromBracket'
|
||||
import {faArrowUpRightFromSquare} from '@fortawesome/free-solid-svg-icons/faArrowUpRightFromSquare'
|
||||
import {faArrowsRotate} from '@fortawesome/free-solid-svg-icons/faArrowsRotate'
|
||||
import {faArrowTrendUp} from '@fortawesome/free-solid-svg-icons/faArrowTrendUp'
|
||||
import {faAt} from '@fortawesome/free-solid-svg-icons/faAt'
|
||||
import {faBars} from '@fortawesome/free-solid-svg-icons/faBars'
|
||||
import {faBell} from '@fortawesome/free-solid-svg-icons/faBell'
|
||||
@@ -81,7 +80,6 @@ export function setup() {
|
||||
faArrowUpFromBracket,
|
||||
faArrowUpRightFromSquare,
|
||||
faArrowsRotate,
|
||||
faArrowTrendUp,
|
||||
faAt,
|
||||
faBars,
|
||||
faBell,
|
||||
|
||||
Reference in New Issue
Block a user