mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-03 04:40:50 +03:00
interface: skip deleted posts in NoteNavigation
Fixes urbit/landscape#857
This commit is contained in:
parent
6256f7d92b
commit
44621ceedc
@ -44,7 +44,11 @@ function getAdjacentId(
|
||||
): BigInteger | null {
|
||||
const children = Array.from(graph);
|
||||
const i = children.findIndex(([index]) => index.eq(child));
|
||||
const target = children[backwards ? i + 1 : i - 1];
|
||||
let idx = backwards ? i + 1 : i - 1;
|
||||
let target = children[idx];
|
||||
while(typeof target?.[1]?.post === 'string') {
|
||||
target = children[backwards ? idx++ : idx--];
|
||||
}
|
||||
return target?.[0] || null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user