tangled
alpha
login
or
join now
jeanmachine.dev
/
witchsky.app
forked from
jollywhoppers.com/witchsky.app
0
fork
atom
Bluesky app fork with some witchin' additions 💫
0
fork
atom
overview
issues
pulls
pipelines
Fix replies with <2 likes showing in the following feed
Paul Frazee
2 years ago
8c675248
d225e857
+10
-2
1 changed file
expand all
collapse all
unified
split
src
lib
api
feed-manip.ts
+10
-2
src/lib/api/feed-manip.ts
···
1
1
-
import {AppBskyFeedDefs} from '@atproto/api'
1
1
+
import {AppBskyFeedDefs, AppBskyFeedPost} from '@atproto/api'
2
2
import lande from 'lande'
3
3
import {hasProp} from 'lib/type-guards'
4
4
import {LANGUAGES_MAP_CODE2} from '../../locale/languages'
···
46
46
return this.items[1]
47
47
}
48
48
return this.items[0]
49
49
+
}
50
50
+
51
51
+
get isReply() {
52
52
+
return (
53
53
+
AppBskyFeedPost.isRecord(this.rootItem.post.record) &&
54
54
+
!!this.rootItem.post.record.reply
55
55
+
)
49
56
}
50
57
51
58
containsUri(uri: string) {
···
176
183
): FeedViewPostsSlice[] {
177
184
// remove any replies without at least 2 likes
178
185
for (let i = slices.length - 1; i >= 0; i--) {
179
179
-
if (slices[i].isFullThread || !slices[i].rootItem.reply) {
186
186
+
if (slices[i].isFullThread || !slices[i].isReply) {
180
187
continue
181
188
}
189
189
+
182
190
const item = slices[i].rootItem
183
191
const isRepost = Boolean(item.reason)
184
192
if (!isRepost && (item.post.likeCount || 0) < 2) {