fix: possibly fixes a crash where inReplyToId is null in a ThreadFragment
cc: @sk22 Btw check the commit before this one, because there is a fix that applies for Megalodon there as well
This commit is contained in:
@@ -315,7 +315,7 @@ public class ThreadFragment extends StatusListFragment implements ProvidesAssist
|
|||||||
// descendant neighbor
|
// descendant neighbor
|
||||||
Optional
|
Optional
|
||||||
.ofNullable(count > index + 1 ? statuses.get(index + 1) : null)
|
.ofNullable(count > index + 1 ? statuses.get(index + 1) : null)
|
||||||
.filter(s -> s.inReplyToId.equals(current.id))
|
.filter(s -> current.id.equals(s.inReplyToId))
|
||||||
.orElse(null),
|
.orElse(null),
|
||||||
// ancestoring neighbor
|
// ancestoring neighbor
|
||||||
Optional.ofNullable(index > 0 ? ancestry.get(index - 1) : null)
|
Optional.ofNullable(index > 0 ? ancestry.get(index - 1) : null)
|
||||||
|
|||||||
Reference in New Issue
Block a user