mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +00:00
Ensure reply indicators only show up in threads
This commit is contained in:
parent
236261ccdb
commit
098d439722
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue