From 0e601d18df54a57cdebfa9397123368e894aa273 Mon Sep 17 00:00:00 2001 From: Xiaoming Liu <13118619+happier2@users.noreply.github.com> Date: Fri, 24 Nov 2017 23:54:37 +0800 Subject: [PATCH] fix updating badge bug (#289) fix bug in effects: fetchNotices, after fetching new notices, we should update notice count in user model. --- src/models/global.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/models/global.js b/src/models/global.js index 8af75a6a..bbbee702 100644 --- a/src/models/global.js +++ b/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({ -- GitLab