diff --git a/src/components/status.jsx b/src/components/status.jsx index bc52ccce..d32fd7df 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -294,12 +294,12 @@ function Status({ {!withinContext && ( <> {inReplyToAccountId === status.account?.id || - !!snapStates.statusThreadNumber[id] ? ( + !!snapStates.statusThreadNumber[sKey] ? (
Thread - {snapStates.statusThreadNumber[id] - ? ` ${snapStates.statusThreadNumber[id]}/X` + {snapStates.statusThreadNumber[sKey] + ? ` ${snapStates.statusThreadNumber[sKey]}/X` : ''}
) : ( diff --git a/src/utils/states.js b/src/utils/states.js index f58b9742..432f7df2 100644 --- a/src/utils/states.js +++ b/src/utils/states.js @@ -124,7 +124,8 @@ export function threadifyStatus(status, propInstance) { throw 'Not a thread'; // Possibly thread of replies by multiple people? } - let prevStatus = states.statuses[inReplyToId]; + const key = statusKey(inReplyToId, instance); + let prevStatus = states.statuses[key]; if (!prevStatus) { if (fetchIndex++ > 3) throw 'Too many fetches for thread'; // Some people revive old threads await new Promise((r) => setTimeout(r, 500 * fetchIndex)); // Be nice to rate limits @@ -139,7 +140,8 @@ export function threadifyStatus(status, propInstance) { if (statuses.length > 1) { console.debug('THREAD', statuses); statuses.forEach((status, index) => { - states.statusThreadNumber[status.id] = index + 1; + const key = statusKey(status.id, instance); + states.statusThreadNumber[key] = index + 1; }); } })