bug: thread loader missing some event ids

This commit is contained in:
Kieran 2023-01-21 22:49:13 +00:00
parent 7680b16ab5
commit 61106c5d19
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -14,8 +14,9 @@ export default function useThreadFeed(id: u256) {
function addId(id: u256[]) {
setTrackingEvent((s) => {
let orig = new Set(s);
if (!id.some(a => orig.has(a))) {
let tmp = new Set([...s, ...id]);
let idsMissing = id.filter(a => !orig.has(a));
if (idsMissing.length > 0) {
let tmp = new Set([...s, ...idsMissing]);
return Array.from(tmp);
} else {
return s;