Sort pins last in thread view (#6426)

This commit is contained in:
dan
2024-11-16 22:02:33 +00:00
committed by GitHub
parent edaf230612
commit 965bcc44dc
+11
View File
@@ -216,6 +216,17 @@ export function sortThread(
}
}
const aPin = Boolean(a.record.text.trim() === '📌')
const bPin = Boolean(b.record.text.trim() === '📌')
if (aPin !== bPin) {
if (aPin) {
return 1
}
if (bPin) {
return -1
}
}
if (opts.prioritizeFollowedUsers) {
const af = a.post.author.viewer?.following
const bf = b.post.author.viewer?.following