diff --git a/app/soapbox/features/status/index.js b/app/soapbox/features/status/index.js index b647a0e7d..2654891e2 100644 --- a/app/soapbox/features/status/index.js +++ b/app/soapbox/features/status/index.js @@ -431,7 +431,7 @@ class Status extends ImmutablePureComponent { renderChildren(list) { return list.map(id => { - if (id.startsWith('tombstone-')) { + if (id.endsWith('-tombstone')) { return this.renderTombstone(id); } else { return this.renderStatus(id); diff --git a/app/soapbox/reducers/__tests__/contexts-test.js b/app/soapbox/reducers/__tests__/contexts-test.js index 03e4d1b1b..054888cec 100644 --- a/app/soapbox/reducers/__tests__/contexts-test.js +++ b/app/soapbox/reducers/__tests__/contexts-test.js @@ -30,7 +30,7 @@ describe('contexts reducer', () => { '9zIH9GTCDWEFSRt2um': '9zIH7PUdhK3Ircg4hM', '9zIH9fhaP9atiJoOJc': '9zIH8WYwtnUx4yDzUm', '9zIH8WYwtnUx4yDzUm': '9zIH7PUdhK3Ircg4hM', - 'tombstone-9zIH8WYwtnUx4yDzUm': '9zIH7mMGgc1RmJwDLM', + '9zIH8WYwtnUx4yDzUm-tombstone': '9zIH7mMGgc1RmJwDLM', }), replies: ImmutableMap({ '9zIH6kDXA10YqhMKqO': ImmutableOrderedSet([ @@ -44,11 +44,11 @@ describe('contexts reducer', () => { '9zIH8WYwtnUx4yDzUm': ImmutableOrderedSet([ '9zIH9fhaP9atiJoOJc', ]), - 'tombstone-9zIH8WYwtnUx4yDzUm': ImmutableOrderedSet([ + '9zIH8WYwtnUx4yDzUm-tombstone': ImmutableOrderedSet([ '9zIH8WYwtnUx4yDzUm', ]), '9zIH7mMGgc1RmJwDLM': ImmutableOrderedSet([ - 'tombstone-9zIH8WYwtnUx4yDzUm', + '9zIH8WYwtnUx4yDzUm-tombstone', ]), }), })); diff --git a/app/soapbox/reducers/contexts.js b/app/soapbox/reducers/contexts.js index cff3636eb..1dd93d119 100644 --- a/app/soapbox/reducers/contexts.js +++ b/app/soapbox/reducers/contexts.js @@ -31,7 +31,7 @@ const importStatuses = (state, statuses) => { }; const insertTombstone = (state, ancestorId, descendantId) => { - const tombstoneId = `tombstone-${descendantId}`; + const tombstoneId = `${descendantId}-tombstone`; return state.withMutations(state => { importStatus(state, { id: tombstoneId, in_reply_to_id: ancestorId }); importStatus(state, { id: descendantId, in_reply_to_id: tombstoneId });