Update shared Qt playback controls after background decoding
This commit is contained in:
1 parent
d4a27d1975
commit
172cc3a649
2 files changed
+32
-29
No files matched your search
@@ -960,8 +960,7 @@ void MessageList::onAttachmentDownloaded(const QString& chId, int64_t msgId) {
|
||||
if (!fp.isEmpty() && QFile::exists(fp)) {
|
||||
QTimer::singleShot(500, this, [this, fp]() {
|
||||
MessageDelegate::stopAllAutoPlay();
|
||||
float actualDur = VoicePlayer::playOpusFile(fp);
|
||||
MessageDelegate::startAutoPlay(fp, actualDur);
|
||||
VoicePlayer::playOpusFile(fp, this, [fp](float actualDur) { MessageDelegate::startAutoPlay(fp, actualDur); });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user