Don't show new-content notification for reposts (close #179) (#197)

This commit is contained in:
Paul Frazee
2023-02-14 16:54:35 -06:00
committed by GitHub
parent 7d162c8101
commit f331fb9c75
+10 -8
View File
@@ -406,14 +406,16 @@ export class FeedModel {
} }
const res = await this._getFeed({limit: 1}) const res = await this._getFeed({limit: 1})
const currentLatestUri = this.pollCursor const currentLatestUri = this.pollCursor
const receivedLatestUri = res.data.feed[0] const item = res.data.feed[0]
? res.data.feed[0].post.uri if (!item) {
: undefined return
const hasNewLatest = Boolean( }
receivedLatestUri && if (AppBskyFeedFeedViewPost.isReasonRepost(item.reason)) {
(this.feed.length === 0 || receivedLatestUri !== currentLatestUri), if (item.reason.by.did === this.rootStore.me.did) {
) return // ignore reposts by the user
this.setHasNewLatest(hasNewLatest) }
}
this.setHasNewLatest(item.post.uri !== currentLatestUri)
} }
/** /**