about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers/statuses.js
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-11-26 09:45:17 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-11-26 01:45:17 +0100
commitfd87e5a53bcaafb886a675c76e9256015e9db897 (patch)
tree0bf67a28925ad8f3d08d4060ba65d6e6aee08f99 /app/javascript/mastodon/reducers/statuses.js
parent57fe4102ea0f94cd451b440d4b23d9c11d91b49f (diff)
Do not filter the status collection after muting and blocking (#5815)
Filtering the status collection wipes out even the profiles of muted and
blocked accounts. However, the behavior is inconsistent with the server-
side behavior.
Diffstat (limited to 'app/javascript/mastodon/reducers/statuses.js')
-rw-r--r--app/javascript/mastodon/reducers/statuses.js19
1 files changed, 0 insertions, 19 deletions
diff --git a/app/javascript/mastodon/reducers/statuses.js b/app/javascript/mastodon/reducers/statuses.js
index b1fb4c5da..5120b2b67 100644
--- a/app/javascript/mastodon/reducers/statuses.js
+++ b/app/javascript/mastodon/reducers/statuses.js
@@ -23,10 +23,6 @@ import {
   TIMELINE_EXPAND_SUCCESS,
 } from '../actions/timelines';
 import {
-  ACCOUNT_BLOCK_SUCCESS,
-  ACCOUNT_MUTE_SUCCESS,
-} from '../actions/accounts';
-import {
   NOTIFICATIONS_UPDATE,
   NOTIFICATIONS_REFRESH_SUCCESS,
   NOTIFICATIONS_EXPAND_SUCCESS,
@@ -88,18 +84,6 @@ const deleteStatus = (state, id, references) => {
   return state.delete(id);
 };
 
-const filterStatuses = (state, relationship) => {
-  state.forEach(status => {
-    if (status.get('account') !== relationship.id) {
-      return;
-    }
-
-    state = deleteStatus(state, status.get('id'), state.filter(item => item.get('reblog') === status.get('id')));
-  });
-
-  return state;
-};
-
 const initialState = ImmutableMap();
 
 export default function statuses(state = initialState, action) {
@@ -139,9 +123,6 @@ export default function statuses(state = initialState, action) {
     return normalizeStatuses(state, action.statuses);
   case TIMELINE_DELETE:
     return deleteStatus(state, action.id, action.references);
-  case ACCOUNT_BLOCK_SUCCESS:
-  case ACCOUNT_MUTE_SUCCESS:
-    return filterStatuses(state, action.relationship);
   default:
     return state;
   }