2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

If stuck wait for three seconds of packets.

This commit is contained in:
John Preston
2019-02-22 18:28:10 +04:00
parent 3e9b811875
commit d37b65e624
17 changed files with 302 additions and 147 deletions

View File

@@ -854,7 +854,7 @@ bool Voice::updateStatusText() {
if (state.id == AudioMsgId(_data, parent()->fullId(), state.id.playId()) && !Media::Player::IsStoppedOrStopping(state.state)) {
statusSize = -1 - (state.position / state.frequency);
realDuration = (state.length / state.frequency);
showPause = (state.state == State::Playing || state.state == State::Resuming || state.state == State::Starting);
showPause = Media::Player::ShowPauseIcon(state.state);
}
} else {
statusSize = FileStatusSizeReady;
@@ -1225,7 +1225,7 @@ bool Document::updateStatusText() {
if (state.id == AudioMsgId(_data, parent()->fullId()) && !Media::Player::IsStoppedOrStopping(state.state)) {
statusSize = -1 - (state.position / state.frequency);
realDuration = (state.length / state.frequency);
showPause = (state.state == State::Playing || state.state == State::Resuming || state.state == State::Starting);
showPause = Media::Player::ShowPauseIcon(state.state);
}
if (!showPause && (state.id == AudioMsgId(_data, parent()->fullId())) && Media::Player::instance()->isSeeking(AudioMsgId::Type::Song)) {
showPause = true;