diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/state/queries/post-thread.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/state/queries/post-thread.ts b/src/state/queries/post-thread.ts index 103a1d03b..93e3a5c3b 100644 --- a/src/state/queries/post-thread.ts +++ b/src/state/queries/post-thread.ts @@ -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 |