Update documentation.

GitOrigin-RevId: 9d171d943a85c04e5b357d967a1a0484d4e61f68
This commit is contained in:
levlam 2019-01-06 05:37:35 +03:00
parent 9030b8d29e
commit 93790e4350
2 changed files with 7 additions and 3 deletions

View File

@ -2662,10 +2662,10 @@ getChatMessageByDate chat_id:int53 date:int32 = Message;
getChatMessageCount chat_id:int53 filter:SearchMessagesFilter return_local:Bool = Count;
//@description Removes an active notification from notification list @notification_group_id Identifier of notification group to which the notification belongs @notification_id Identifier of removed notification
//@description Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user @notification_group_id Identifier of notification group to which the notification belongs @notification_id Identifier of removed notification
removeNotification notification_group_id:int32 notification_id:int32 = Ok;
//@description Removes group of active notifications @notification_group_id Notification group identifier @max_notification_id Maximum identifier of removed notifications
//@description Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user @notification_group_id Notification group identifier @max_notification_id Maximum identifier of removed notifications
removeNotificationGroup notification_group_id:int32 max_notification_id:int32 = Ok;

View File

@ -714,7 +714,7 @@ void NotificationManager::add_update(int32 group_id, td_api::object_ptr<td_api::
if (!running_get_difference_ && running_get_chat_difference_.count(group_id) == 0) {
flush_pending_updates_timeout_.add_timeout_in(group_id, MIN_UPDATE_DELAY_MS * 1e-3);
} else {
flush_pending_updates_timeout_.set_timeout_in(group_id, 3 * MAX_UPDATE_DELAY_MS * 1e-3);
flush_pending_updates_timeout_.set_timeout_in(group_id, MAX_UPDATE_DELAY_MS * 1e-3);
}
}
@ -1077,6 +1077,10 @@ void NotificationManager::flush_pending_updates(int32 group_id, const char *sour
void NotificationManager::flush_all_pending_updates(bool include_delayed_chats, const char *source) {
VLOG(notifications) << "Flush all pending notification updates "
<< (include_delayed_chats ? "with delayed chats " : "") << "from " << source;
if (!include_delayed_chats && running_get_difference_) {
return;
}
vector<NotificationGroupKey> ready_group_keys;
for (const auto &it : pending_updates_) {
if (include_delayed_chats || running_get_chat_difference_.count(it.first) == 0) {