diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-10-03 19:55:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 19:55:28 -0700 |
commit | 6598fca79d8f1253d6b74c9bbcf24fa384ffaa9b (patch) | |
tree | 0f2e1fabf951ddc6a9c2211586ba45e34c40045a /src/state/models/content/post-thread.ts | |
parent | 588659380a91286f1a3de2b8b8321168d15a444c (diff) | |
download | voidsky-6598fca79d8f1253d6b74c9bbcf24fa384ffaa9b.tar.zst |
Fix: only use scroll-positioning control on thread when looking at replies (#1587)
Diffstat (limited to 'src/state/models/content/post-thread.ts')
-rw-r--r-- | src/state/models/content/post-thread.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/state/models/content/post-thread.ts b/src/state/models/content/post-thread.ts index 981fb1f1d..a862c27d3 100644 --- a/src/state/models/content/post-thread.ts +++ b/src/state/models/content/post-thread.ts @@ -2,6 +2,7 @@ import {makeAutoObservable, runInAction} from 'mobx' import { AppBskyFeedGetPostThread as GetPostThread, AppBskyFeedDefs, + AppBskyFeedPost, PostModeration, } from '@atproto/api' import {AtUri} from '@atproto/api' @@ -76,6 +77,13 @@ export class PostThreadModel { return this.rootStore.mutedThreads.uris.has(this.rootUri) } + get isCachedPostAReply() { + if (AppBskyFeedPost.isRecord(this.thread?.post.record)) { + return !!this.thread?.post.record.reply + } + return false + } + // public api // = |