fix: a possible crash that might happen when the acestor descendant is null
Wtf java, also cc @sk22
This commit is contained in:
parent
3d48443a23
commit
3bf63e1090
|
@ -320,7 +320,7 @@ public class ThreadFragment extends StatusListFragment implements ProvidesAssist
|
||||||
// ancestoring neighbor
|
// ancestoring neighbor
|
||||||
Optional.ofNullable(index > 0 ? ancestry.get(index - 1) : null)
|
Optional.ofNullable(index > 0 ? ancestry.get(index - 1) : null)
|
||||||
.filter(ancestor -> Optional.ofNullable(ancestor.descendantNeighbor)
|
.filter(ancestor -> Optional.ofNullable(ancestor.descendantNeighbor)
|
||||||
.map(ancestorsDescendant -> ancestorsDescendant.id.equals(current.id))
|
.map(ancestorsDescendant -> current.id.equals(ancestorsDescendant.id))
|
||||||
.orElse(false))
|
.orElse(false))
|
||||||
.map(a -> a.status)
|
.map(a -> a.status)
|
||||||
.orElse(null)
|
.orElse(null)
|
||||||
|
|
Loading…
Reference in New Issue