2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Alpha 1.0.8: seek in voice messages (by waveform).

This commit is contained in:
John Preston
2017-02-11 01:37:37 +03:00
parent 296c800b39
commit e922e5be39
26 changed files with 347 additions and 125 deletions

View File

@@ -195,7 +195,7 @@ void Widget::handleSeekProgress(float64 progress) {
_seekPositionMs = positionMs;
updateTimeLabel();
instance()->startSeeking();
instance()->startSeeking(AudioMsgId::Type::Song);
}
}
@@ -211,7 +211,7 @@ void Widget::handleSeekFinished(float64 progress) {
mixer()->seek(type, qRound(progress * state.duration));
}
instance()->stopSeeking();
instance()->stopSeeking(AudioMsgId::Type::Song);
}
void Widget::resizeEvent(QResizeEvent *e) {
@@ -312,7 +312,7 @@ void Widget::handleSongUpdate(const TrackState &state) {
auto stopped = (IsStopped(state.state) || state.state == State::Finishing);
auto showPause = !stopped && (state.state == State::Playing || state.state == State::Resuming || state.state == State::Starting);
if (instance()->isSeeking()) {
if (instance()->isSeeking(AudioMsgId::Type::Song)) {
showPause = true;
}
auto buttonState = [audio = state.id.audio(), showPause] {