| 886 | } |
| 887 | |
| 888 | void RoutingSession::OnTrafficInfoAdded(TrafficInfo && info) |
| 889 | { |
| 890 | TrafficInfo::Coloring const & fullColoring = info.GetColoring(); |
| 891 | auto coloring = std::make_shared<TrafficInfo::Coloring>(); |
| 892 | for (auto const & kv : fullColoring) |
| 893 | { |
| 894 | ASSERT_NOT_EQUAL(kv.second, SpeedGroup::Unknown, ()); |
| 895 | coloring->insert(kv); |
| 896 | } |
| 897 | |
| 898 | // Note. |coloring| should not be used after this call on gui thread. |
| 899 | auto const mwmId = info.GetMwmId(); |
| 900 | GetPlatform().RunTask(Platform::Thread::Gui, [this, mwmId, coloring]() |
| 901 | { |
| 902 | Set(mwmId, coloring); |
| 903 | RebuildRouteOnTrafficUpdate(); |
| 904 | }); |
| 905 | } |
| 906 | |
| 907 | void RoutingSession::OnTrafficInfoRemoved(MwmSet::MwmId const & mwmId) |
| 908 | { |
no test coverage detected