Added timestamp highlighting in voice captions.
This commit is contained in:
parent
092b6e7c18
commit
658671089e
|
@ -428,7 +428,7 @@ bool OpenMediaTimestamp(
|
|||
Core::App().showDocument(
|
||||
document,
|
||||
session->data().message(itemId));
|
||||
} else if (document->isSong()) {
|
||||
} else if (document->isSong() || document->isVoiceMessage()) {
|
||||
Media::Player::instance()->play({ document, itemId });
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -1498,7 +1498,10 @@ TextWithEntities HistoryMessage::withLocalEntities(
|
|||
const auto document = reply->replyToDocumentId
|
||||
? history()->owner().document(reply->replyToDocumentId).get()
|
||||
: nullptr;
|
||||
if (document && (document->isVideoFile() || document->isSong())) {
|
||||
if (document
|
||||
&& (document->isVideoFile()
|
||||
|| document->isSong()
|
||||
|| document->isVoiceMessage())) {
|
||||
using namespace HistoryView;
|
||||
const auto duration = document->getDuration();
|
||||
const auto base = (duration > 0)
|
||||
|
|
|
@ -1095,7 +1095,8 @@ TextWithEntities Document::getCaption() const {
|
|||
}
|
||||
|
||||
Ui::Text::String Document::createCaption() {
|
||||
const auto timestampLinksDuration = _data->isSong()
|
||||
const auto timestampLinksDuration = (_data->isSong()
|
||||
|| _data->isVoiceMessage())
|
||||
? _data->getDuration()
|
||||
: 0;
|
||||
const auto timestampLinkBase = timestampLinksDuration
|
||||
|
|
Loading…
Reference in New Issue