mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix recording single-listen tooltip text.
This commit is contained in:
parent
66be2ac6ca
commit
2d6d89b1cf
2 changed files with 12 additions and 5 deletions
|
@ -3276,6 +3276,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_record_video_problem" = "Could not start video recording. Please check your camera.";
|
"lng_record_video_problem" = "Could not start video recording. Please check your camera.";
|
||||||
"lng_record_once_first_tooltip" = "Click to set this message to **Play Once**.";
|
"lng_record_once_first_tooltip" = "Click to set this message to **Play Once**.";
|
||||||
"lng_record_once_active_tooltip" = "The recipient will be able to listen only once.";
|
"lng_record_once_active_tooltip" = "The recipient will be able to listen only once.";
|
||||||
|
"lng_record_once_active_video" = "The recipient will be able to watch only once.";
|
||||||
"lng_will_be_notified" = "Subscribers will be notified when you post.";
|
"lng_will_be_notified" = "Subscribers will be notified when you post.";
|
||||||
"lng_wont_be_notified" = "Subscribers will receive a silent notification.";
|
"lng_wont_be_notified" = "Subscribers will receive a silent notification.";
|
||||||
"lng_willbe_history" = "Select a chat to start messaging";
|
"lng_willbe_history" = "Select a chat to start messaging";
|
||||||
|
|
|
@ -364,7 +364,8 @@ class TTLButton final : public Ui::RippleButton {
|
||||||
public:
|
public:
|
||||||
TTLButton(
|
TTLButton(
|
||||||
not_null<Ui::RpWidget*> parent,
|
not_null<Ui::RpWidget*> parent,
|
||||||
const style::RecordBar &st);
|
const style::RecordBar &st,
|
||||||
|
bool recordingVideo);
|
||||||
|
|
||||||
void clearState() override;
|
void clearState() override;
|
||||||
|
|
||||||
|
@ -383,7 +384,8 @@ private:
|
||||||
|
|
||||||
TTLButton::TTLButton(
|
TTLButton::TTLButton(
|
||||||
not_null<Ui::RpWidget*> parent,
|
not_null<Ui::RpWidget*> parent,
|
||||||
const style::RecordBar &st)
|
const style::RecordBar &st,
|
||||||
|
bool recordingVideo)
|
||||||
: RippleButton(parent, st.lock.ripple)
|
: RippleButton(parent, st.lock.ripple)
|
||||||
, _st(st)
|
, _st(st)
|
||||||
, _rippleRect(Rect(Size(st::historyRecordLockTopShadow.width()))
|
, _rippleRect(Rect(Size(st::historyRecordLockTopShadow.width()))
|
||||||
|
@ -410,8 +412,10 @@ TTLButton::TTLButton(
|
||||||
}
|
}
|
||||||
auto text = rpl::conditional(
|
auto text = rpl::conditional(
|
||||||
Core::App().settings().ttlVoiceClickTooltipHiddenValue(),
|
Core::App().settings().ttlVoiceClickTooltipHiddenValue(),
|
||||||
tr::lng_record_once_active_tooltip(
|
(recordingVideo
|
||||||
Ui::Text::RichLangValue),
|
? tr::lng_record_once_active_video
|
||||||
|
: tr::lng_record_once_active_tooltip)(
|
||||||
|
Ui::Text::RichLangValue),
|
||||||
tr::lng_record_once_first_tooltip(
|
tr::lng_record_once_first_tooltip(
|
||||||
Ui::Text::RichLangValue));
|
Ui::Text::RichLangValue));
|
||||||
_tooltip.reset(Ui::CreateChild<Ui::ImportantTooltip>(
|
_tooltip.reset(Ui::CreateChild<Ui::ImportantTooltip>(
|
||||||
|
@ -1624,7 +1628,8 @@ void VoiceRecordBar::init() {
|
||||||
if (!_ttlButton) {
|
if (!_ttlButton) {
|
||||||
_ttlButton = std::make_unique<TTLButton>(
|
_ttlButton = std::make_unique<TTLButton>(
|
||||||
_outerContainer,
|
_outerContainer,
|
||||||
_st);
|
_st,
|
||||||
|
_recordingVideo);
|
||||||
}
|
}
|
||||||
_ttlButton->show();
|
_ttlButton->show();
|
||||||
}
|
}
|
||||||
|
@ -1659,6 +1664,7 @@ void VoiceRecordBar::init() {
|
||||||
}
|
}
|
||||||
_recordingTipRequire = crl::now();
|
_recordingTipRequire = crl::now();
|
||||||
_recordingVideo = (_send->type() == Ui::SendButton::Type::Round);
|
_recordingVideo = (_send->type() == Ui::SendButton::Type::Round);
|
||||||
|
_ttlButton = nullptr;
|
||||||
_lock->setRecordingVideo(_recordingVideo);
|
_lock->setRecordingVideo(_recordingVideo);
|
||||||
_startTimer.callOnce(st::universalDuration);
|
_startTimer.callOnce(st::universalDuration);
|
||||||
} else if (e->type() == QEvent::MouseButtonRelease) {
|
} else if (e->type() == QEvent::MouseButtonRelease) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue