about summary refs log tree commit diff
path: root/app/javascript/mastodon/reducers
diff options
context:
space:
mode:
authorOSAMU SATO <satosamu@gmail.com>2020-10-13 08:01:14 +0900
committerGitHub <noreply@github.com>2020-10-13 01:01:14 +0200
commit96761752eccfc0d239974a24e0cc2d74c6aee7ac (patch)
tree1590275b4f8a1f954d90e870ef2bfb8ac00d7109 /app/javascript/mastodon/reducers
parentf54ca3d08e068af07a5b7a8b139e7658b3236db8 (diff)
Add duration parameter to muting. (#13831)
* Adding duration to muting.

* Remove useless checks
Diffstat (limited to 'app/javascript/mastodon/reducers')
-rw-r--r--app/javascript/mastodon/reducers/mutes.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/mutes.js b/app/javascript/mastodon/reducers/mutes.js
index 4672e5097..a9eb61ff8 100644
--- a/app/javascript/mastodon/reducers/mutes.js
+++ b/app/javascript/mastodon/reducers/mutes.js
@@ -3,12 +3,14 @@ import Immutable from 'immutable';
 import {
   MUTES_INIT_MODAL,
   MUTES_TOGGLE_HIDE_NOTIFICATIONS,
+  MUTES_CHANGE_DURATION,
 } from '../actions/mutes';
 
 const initialState = Immutable.Map({
   new: Immutable.Map({
     account: null,
     notifications: true,
+    duration: 0,
   }),
 });
 
@@ -21,6 +23,8 @@ export default function mutes(state = initialState, action) {
     });
   case MUTES_TOGGLE_HIDE_NOTIFICATIONS:
     return state.updateIn(['new', 'notifications'], (old) => !old);
+  case MUTES_CHANGE_DURATION:
+    return state.setIn(['new', 'duration'], Number(action.duration));
   default:
     return state;
   }