浏览代码

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({