From 098d439722c26950655f25060e4bda3e306853b1 Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Sat, 26 Sep 2020 17:47:30 -0700 Subject: [PATCH] Ensure reply indicators only show up in threads --- ViewModels/Sources/ViewModels/StatusListViewModel.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ViewModels/Sources/ViewModels/StatusListViewModel.swift b/ViewModels/Sources/ViewModels/StatusListViewModel.swift index ad7e428..599b596 100644 --- a/ViewModels/Sources/ViewModels/StatusListViewModel.swift +++ b/ViewModels/Sources/ViewModels/StatusListViewModel.swift @@ -160,6 +160,7 @@ private extension StatusListViewModel { func isReplyInContext(status: Status) -> Bool { guard + let contextParentID = contextParentID, let index = flatStatusIDs.firstIndex(where: { $0 == status.id }), index > 0 else { return false } @@ -171,6 +172,7 @@ private extension StatusListViewModel { func hasReplyFollowing(status: Status) -> Bool { guard + let contextParentID = contextParentID, let index = flatStatusIDs.firstIndex(where: { $0 == status.id }), flatStatusIDs.count > index + 1, let nextStatus = statuses[flatStatusIDs[index + 1]]