mirror of
https://github.com/metabolist/metatext
synced 2025-01-07 07:33:09 +01:00
Ensure reply indicators only show up in threads
This commit is contained in:
parent
236261ccdb
commit
098d439722
@ -160,6 +160,7 @@ private extension StatusListViewModel {
|
|||||||
|
|
||||||
func isReplyInContext(status: Status) -> Bool {
|
func isReplyInContext(status: Status) -> Bool {
|
||||||
guard
|
guard
|
||||||
|
let contextParentID = contextParentID,
|
||||||
let index = flatStatusIDs.firstIndex(where: { $0 == status.id }),
|
let index = flatStatusIDs.firstIndex(where: { $0 == status.id }),
|
||||||
index > 0
|
index > 0
|
||||||
else { return false }
|
else { return false }
|
||||||
@ -171,6 +172,7 @@ private extension StatusListViewModel {
|
|||||||
|
|
||||||
func hasReplyFollowing(status: Status) -> Bool {
|
func hasReplyFollowing(status: Status) -> Bool {
|
||||||
guard
|
guard
|
||||||
|
let contextParentID = contextParentID,
|
||||||
let index = flatStatusIDs.firstIndex(where: { $0 == status.id }),
|
let index = flatStatusIDs.firstIndex(where: { $0 == status.id }),
|
||||||
flatStatusIDs.count > index + 1,
|
flatStatusIDs.count > index + 1,
|
||||||
let nextStatus = statuses[flatStatusIDs[index + 1]]
|
let nextStatus = statuses[flatStatusIDs[index + 1]]
|
||||||
|
Loading…
Reference in New Issue
Block a user