fix: a possible crash that might happen when the acestor descendant is null

Wtf java, also cc @sk22
This commit is contained in:
LucasGGamerM 2023-12-08 09:55:18 -03:00
parent 3d48443a23
commit 3bf63e1090
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ public class ThreadFragment extends StatusListFragment implements ProvidesAssist
// ancestoring neighbor
Optional.ofNullable(index > 0 ? ancestry.get(index - 1) : null)
.filter(ancestor -> Optional.ofNullable(ancestor.descendantNeighbor)
.map(ancestorsDescendant -> ancestorsDescendant.id.equals(current.id))
.map(ancestorsDescendant -> current.id.equals(ancestorsDescendant.id))
.orElse(false))
.map(a -> a.status)
.orElse(null)