mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 15:13:57 +02:00
Show recording init errors.
This commit is contained in:
parent
ae89b65a98
commit
b01d7ea5b9
1 changed files with 18 additions and 0 deletions
|
@ -1057,6 +1057,24 @@ void HistoryWidget::initVoiceRecordBar() {
|
||||||
_cornerButtons.updateUnreadThingsVisibility();
|
_cornerButtons.updateUnreadThingsVisibility();
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
|
_voiceRecordBar->errors(
|
||||||
|
) | rpl::start_with_next([=](::Media::Capture::Error error) {
|
||||||
|
using Error = ::Media::Capture::Error;
|
||||||
|
switch (error) {
|
||||||
|
case Error::AudioInit:
|
||||||
|
case Error::AudioTimeout:
|
||||||
|
controller()->showToast(tr::lng_record_audio_problem(tr::now));
|
||||||
|
break;
|
||||||
|
case Error::VideoInit:
|
||||||
|
case Error::VideoTimeout:
|
||||||
|
controller()->showToast(tr::lng_record_video_problem(tr::now));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
controller()->showToast(u"Unknown error."_q);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}, lifetime());
|
||||||
|
|
||||||
_voiceRecordBar->updateSendButtonTypeRequests(
|
_voiceRecordBar->updateSendButtonTypeRequests(
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
updateSendButtonType();
|
updateSendButtonType();
|
||||||
|
|
Loading…
Add table
Reference in a new issue