mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:40:05 +00:00
Add text event pruning
- Still need to prune AlertLayer - Still need to test alerts reload after being pruned
This commit is contained in:
parent
4719badc54
commit
f37a77a9f7
6 changed files with 158 additions and 8 deletions
|
|
@ -138,8 +138,10 @@ common::Coordinate AlertManager::Impl::CurrentCoordinate(
|
|||
void AlertManager::Impl::HandleAlert(const types::TextEventKey& key,
|
||||
size_t messageIndex) const
|
||||
{
|
||||
auto messages = textEventManager_->message_list(key);
|
||||
|
||||
// Skip alert if there are more messages to be processed
|
||||
if (messageIndex + 1 < textEventManager_->message_count(key))
|
||||
if (messages.empty() || messageIndex + 1 < messages.size())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -153,7 +155,7 @@ void AlertManager::Impl::HandleAlert(const types::TextEventKey& key,
|
|||
audioSettings.alert_radius().GetValue());
|
||||
std::string alertWFO = audioSettings.alert_wfo().GetValue();
|
||||
|
||||
auto message = textEventManager_->message_list(key).at(messageIndex);
|
||||
auto message = messages.at(messageIndex);
|
||||
|
||||
for (auto& segment : message->segments())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue