From bd5a66b3d2595fae1f2970d6c3d409cc2ec48034 Mon Sep 17 00:00:00 2001 From: Kuba Suder Date: Sun, 24 May 2026 23:14:10 +0200 Subject: [PATCH] set flag if a post was a hidden reply --- src/components/posts/HiddenRepliesLink.svelte | 1 + src/models/posts.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/components/posts/HiddenRepliesLink.svelte b/src/components/posts/HiddenRepliesLink.svelte index 97e034a..6f25c93 100644 --- a/src/components/posts/HiddenRepliesLink.svelte +++ b/src/components/posts/HiddenRepliesLink.svelte @@ -33,6 +33,7 @@ if (r.status == 'fulfilled') { let json = r.value; let subthread = parseThreadPost(json.thread, post.pageRoot, 1, post.absoluteLevel + 1); + subthread.isHiddenReply = true; return [subthread]; } else { return []; diff --git a/src/models/posts.js b/src/models/posts.js index fda6dc5..cfe7b65 100644 --- a/src/models/posts.js +++ b/src/models/posts.js @@ -22,6 +22,12 @@ export class PostDataError extends Error { export class BasePost extends ATProtoRecord { + /** + * Set to true if the post was loaded from the "hidden replies" link (as a direct descendant). + * @type {boolean} + */ + isHiddenReply = false; + /** @returns {string} */ get didLinkToAuthor() { let { repo } = atURI(this.uri); -- 2.51.2