]> cat aescling's git repositories - mastodon.git/commitdiff
When unreblog arrives over streaming API, just delete in UI (#5439)
authorEugen Rochko <eugen@zeonfederated.com>
Tue, 17 Oct 2017 20:17:02 +0000 (22:17 +0200)
committerGitHub <noreply@github.com>
Tue, 17 Oct 2017 20:17:02 +0000 (22:17 +0200)
app/javascript/mastodon/reducers/timelines.js

index c3f1176478ed0e2b9f5f8a1f62f95733a2392856..bee4c4ef92c8336e8b7e09491d43457ecf1b3fcf 100644 (file)
@@ -75,15 +75,9 @@ const updateTimeline = (state, timeline, status, references) => {
   }));
 };
 
-const deleteStatus = (state, id, accountId, references, reblogOf) => {
+const deleteStatus = (state, id, accountId, references) => {
   state.keySeq().forEach(timeline => {
-    state = state.updateIn([timeline, 'items'], list => {
-      if (reblogOf && !list.includes(reblogOf)) {
-        return list.map(item => item === id ? reblogOf : item);
-      } else {
-        return list.filterNot(item => item === id);
-      }
-    });
+    state = state.updateIn([timeline, 'items'], list => list.filterNot(item => item === id));
   });
 
   // Remove reblogs of deleted status