Skip to content

Commit b2113fa

Browse files
committed
[修复] 预览评论预加载器生命周期错乱
1 parent 85d7283 commit b2113fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/com/yenaly/han1meviewer/ui/fragment/video/CommentFragment.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ class CommentFragment : YenalyFragment<FragmentCommentBinding, CommentViewModel>
143143
viewModel.videoCommentFlow.collectLatest { list ->
144144
if (!isPreviewCommentPrefetched) {
145145
commentAdapter.submitList(list)
146-
PreviewCommentPrefetcher.here().update(list)
146+
if (context is PreviewCommentActivity) {
147+
PreviewCommentPrefetcher.here().update(list)
148+
}
147149
}
148150
}
149151
}

0 commit comments

Comments
 (0)