Fix of #7170. Delayed notification is not moved until push will succeed.

This commit is contained in:
David Kocik 2021-10-26 14:03:58 +02:00
parent 79d9fd154e
commit 8bf4408731
3 changed files with 8 additions and 3 deletions

View file

@ -706,6 +706,7 @@ private:
// Otherwise another delay interval waiting. Timestamp is 0.
// Note that notification object is constructed when being added to the waiting list, but there are no updates called on it and its timer is reset at regular push.
// Also note that no control of same notification is done during push_delayed_notification_data but if waiting notif fails to push, it continues waiting.
// If delay_interval is 0, notification is pushed only after initial_delay no matter the result.
void push_delayed_notification_data(std::unique_ptr<NotificationManager::PopNotification> notification, std::function<bool(void)> condition_callback, int64_t initial_delay, int64_t delay_interval);
//finds older notification of same type and moves it to the end of queue. returns true if found
bool activate_existing(const NotificationManager::PopNotification* notification);