about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/state/models/content/post-thread.ts8
-rw-r--r--src/view/com/post-thread/PostThread.tsx2
2 files changed, 9 insertions, 1 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
   // =
 
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx
index 7f6e9ca19..c53c2686c 100644
--- a/src/view/com/post-thread/PostThread.tsx
+++ b/src/view/com/post-thread/PostThread.tsx
@@ -367,7 +367,7 @@ export const PostThread = observer(function PostThread({
       data={posts}
       initialNumToRender={posts.length}
       maintainVisibleContentPosition={
-        isNative && view.isFromCache
+        isNative && view.isFromCache && view.isCachedPostAReply
           ? MAINTAIN_VISIBLE_CONTENT_POSITION
           : undefined
       }