Explorar el Código

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

master
Eugen Rochko hace 6 años
committed by GitHub
padre
commit
11436358b4
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. +7
    -1
      app/javascript/mastodon/reducers/contexts.js

+ 7
- 1
app/javascript/mastodon/reducers/contexts.js Ver fichero

@@ -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;


Cargando…
Cancelar
Guardar