added wip effect for (dis/re)connected messages

This commit is contained in:
fourtf
2018-12-04 21:07:55 +01:00
parent 96328a5e25
commit fc93d7b738
9 changed files with 172 additions and 22 deletions
+8 -7
View File
@@ -264,17 +264,18 @@ void ChannelView::updatePauseTimer()
else
{
/// Get the maximum pause
auto max = std::max_element(
this->pauses_.begin(), this->pauses_.end(),
[](auto &&a, auto &&b) { return a.second > b.second; })
->second.get();
auto pauseEnd =
std::max_element(
this->pauses_.begin(), this->pauses_.end(),
[](auto &&a, auto &&b) { return a.second > b.second; })
->second.get();
if (max != this->pauseEnd_)
if (pauseEnd != this->pauseEnd_)
{
/// Start the timer
this->pauseEnd_ = max;
this->pauseEnd_ = pauseEnd;
this->pauseTimer_.start(
duration_cast<milliseconds>(max - SteadyClock::now()));
duration_cast<milliseconds>(pauseEnd - SteadyClock::now()));
}
}
}