Use custom toast for video-not-available state.

This commit is contained in:
John Preston 2024-10-28 09:22:57 +04:00
parent 2567096de0
commit 93605db690
3 changed files with 7 additions and 2 deletions

View File

@ -3267,6 +3267,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_record_listen_cancel_sure" = "Do you want to discard your recorded voice message?";
"lng_record_listen_cancel_sure_round" = "Do you want to discard your recorded video message?";
"lng_record_lock_discard" = "Discard";
"lng_record_hold_tip" = "Please hold the mouse button pressed to record a voice message.";
"lng_record_voice_tip" = "Hold to record audio. Click to switch to video.";
"lng_record_video_tip" = "Hold to record video. Click to switch to audio.";
"lng_record_audio_problem" = "Could not start audio recording. Please check your microphone.";

View File

@ -1092,7 +1092,9 @@ void HistoryWidget::initVoiceRecordBar() {
updateSendButtonType();
switch (_send->type()) {
case Ui::SendButton::Type::Record:
controller()->showToast(tr::lng_record_voice_tip(tr::now));
controller()->showToast(_canRecordVideoMessage
? tr::lng_record_voice_tip(tr::now)
: tr::lng_record_hold_tip(tr::now));
break;
case Ui::SendButton::Type::Round:
controller()->showToast(tr::lng_record_video_tip(tr::now));

View File

@ -2431,7 +2431,9 @@ void ComposeControls::initVoiceRecordBar() {
updateSendButtonType();
switch (_send->type()) {
case Ui::SendButton::Type::Record:
_show->showToast(tr::lng_record_voice_tip(tr::now));
_show->showToast(_canRecordVideoMessage
? tr::lng_record_voice_tip(tr::now)
: tr::lng_record_hold_tip(tr::now));
break;
case Ui::SendButton::Type::Round:
_show->showToast(tr::lng_record_video_tip(tr::now));