refactor!: Rewrite of the old notification service (#2866)

The main goal was improving the readability of the original code however some ugliness remains.

- Swapped from pointer singleton to instance singleton
- Actually make use of the alpha logic that used to be present
- Added a counter to notifications to indicate if something is being spammed
- Notification timeouts reset if they're sent to the queue again
This commit is contained in:
Andreas Maerten
2024-03-23 00:04:49 +01:00
committed by GitHub
parent dd5da5efec
commit 99afa8dfbb
99 changed files with 459 additions and 359 deletions
+2 -2
View File
@@ -64,11 +64,11 @@ namespace big
g_fiber_pool->queue_job([] {
session::join_session(gta_util::get_network()->m_last_joined_session.m_session_info);
});
g_notification_service->push_warning("KICKED"_T.data(), "You have been desync kicked. Rejoining previous session...");
g_notification_service.push_warning("KICKED"_T.data(), "You have been desync kicked. Rejoining previous session...");
}
else
{
g_notification_service->push_warning("KICKED"_T.data(), "USER_DESYNC_KICKED"_T.data());
g_notification_service.push_warning("KICKED"_T.data(), "USER_DESYNC_KICKED"_T.data());
}
break;
}