Преглед изворни кода

fixed clearNotices effects in global model (#266)

Reorder the process in "clearNotices"
Xiaoming Liu пре 8 година
родитељ
комит
51e1ffebdf
1 измењених фајлова са 4 додато и 5 уклоњено
  1. 4 5
      src/models/global.js

+ 4 - 5
src/models/global.js

@@ -22,16 +22,15 @@ export default {
       });
     },
     *clearNotices({ payload }, { put, select }) {
+      yield put({
+        type: 'saveClearedNotices',
+        payload,
+      });
       const count = yield select(state => state.global.notices.length);
       yield put({
         type: 'user/changeNotifyCount',
         payload: count,
       });
-
-      yield put({
-        type: 'saveClearedNotices',
-        payload,
-      });
     },
   },