Sfoglia il codice sorgente

Fix regression from #5206 - deduplicate descendants (#5253)

master
Eugen Rochko 6 anni fa
committed by GitHub
parent
commit
11436358b4
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. +7
    -1
      app/javascript/mastodon/reducers/contexts.js

+ 7
- 1
app/javascript/mastodon/reducers/contexts.js Vedi File

@@ -34,7 +34,13 @@ const deleteFromContexts = (state, id) => {
const updateContext = (state, status, references) => {
return state.update('descendants', map => {
references.forEach(parentId => {
map = map.update(parentId, ImmutableList(), list => list.push(status.id));
map = map.update(parentId, ImmutableList(), list => {
if (list.includes(status.id)) {
return list;
}

return list.push(status.id);
});
});

return map;


Caricamento…
Annulla
Salva