mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 04:45:08 +01:00
Follow-up
This commit is contained in:
parent
15d04b83a8
commit
cfb3291d1c
@ -25,10 +25,10 @@ import {
|
||||
import { throttle } from '../../../util/schedulers';
|
||||
|
||||
const TYPING_STATUS_CLEAR_DELAY = 6000; // 6 seconds
|
||||
|
||||
// Enough to animate and mark as read in Message List
|
||||
const CURRENT_CHAT_UNREAD_DELAY = 1500;
|
||||
const runThrottledForUpdateAppBadge = throttle((cb) => cb(), CURRENT_CHAT_UNREAD_DELAY, true);
|
||||
|
||||
const runThrottledForUpdateAppBadge = throttle((cb) => cb(), 500, true);
|
||||
|
||||
addReducer('apiUpdate', (global, actions, update: ApiUpdate) => {
|
||||
switch (update['@type']) {
|
||||
@ -83,6 +83,8 @@ addReducer('apiUpdate', (global, actions, update: ApiUpdate) => {
|
||||
case 'updateChatInbox': {
|
||||
setGlobal(updateChat(global, update.id, update.chat));
|
||||
|
||||
runThrottledForUpdateAppBadge(() => updateAppBadge(selectCountNotMutedUnread(getGlobal())));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user