소스 검색

fix updating badge bug (#289)

fix bug in effects: fetchNotices, after fetching new notices, we should update notice count in user model.
Xiaoming Liu 8 년 전
부모
커밋
0e601d18df
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/models/global.js

+ 4 - 0
src/models/global.js

@@ -20,6 +20,10 @@ export default {
         type: 'saveNotices',
         payload: data,
       });
+      yield put({
+        type: 'user/changeNotifyCount',
+        payload: data.length,
+      });
     },
     *clearNotices({ payload }, { put, select }) {
       yield put({