소스 검색

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,
-      });
     },
   },