Use separate record cancel text in stories.
This commit is contained in:
parent
0b7af5bfe3
commit
5b10b7e15f
|
@ -2062,6 +2062,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
"lng_send_as_premium_required" = "Subscribe to {link} to be able to comment on behalf of your channels in group chats.";
|
"lng_send_as_premium_required" = "Subscribe to {link} to be able to comment on behalf of your channels in group chats.";
|
||||||
"lng_send_as_premium_required_link" = "Telegram Premium";
|
"lng_send_as_premium_required_link" = "Telegram Premium";
|
||||||
"lng_record_cancel" = "Release outside this field to cancel";
|
"lng_record_cancel" = "Release outside this field to cancel";
|
||||||
|
"lng_record_cancel_stories" = "Release outside to cancel";
|
||||||
"lng_record_lock_cancel_sure" = "Are you sure you want to stop recording and discard your voice message?";
|
"lng_record_lock_cancel_sure" = "Are you sure you want to stop recording and discard your voice message?";
|
||||||
"lng_record_listen_cancel_sure" = "Are you sure you want to discard your recorded voice message?";
|
"lng_record_listen_cancel_sure" = "Are you sure you want to discard your recorded voice message?";
|
||||||
"lng_record_lock_discard" = "Discard";
|
"lng_record_lock_discard" = "Discard";
|
||||||
|
|
|
@ -996,6 +996,7 @@ ComposeControls::ComposeControls(
|
||||||
.outerContainer = parent,
|
.outerContainer = parent,
|
||||||
.show = _show,
|
.show = _show,
|
||||||
.send = _send,
|
.send = _send,
|
||||||
|
.customCancelText = descriptor.voiceCustomCancelText,
|
||||||
.stOverride = &_st.record,
|
.stOverride = &_st.record,
|
||||||
.recorderHeight = st::historySendSize.height(),
|
.recorderHeight = st::historySendSize.height(),
|
||||||
.lockFromBottom = descriptor.voiceLockFromBottom,
|
.lockFromBottom = descriptor.voiceLockFromBottom,
|
||||||
|
|
|
@ -103,6 +103,7 @@ struct ComposeControlsDescriptor {
|
||||||
Window::SessionController *regularWindow = nullptr;
|
Window::SessionController *regularWindow = nullptr;
|
||||||
rpl::producer<ChatHelpers::FileChosen> stickerOrEmojiChosen;
|
rpl::producer<ChatHelpers::FileChosen> stickerOrEmojiChosen;
|
||||||
rpl::producer<QString> customPlaceholder;
|
rpl::producer<QString> customPlaceholder;
|
||||||
|
QString voiceCustomCancelText;
|
||||||
bool voiceLockFromBottom = false;
|
bool voiceLockFromBottom = false;
|
||||||
ChatHelpers::ComposeFeatures features;
|
ChatHelpers::ComposeFeatures features;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1024,7 +1024,9 @@ VoiceRecordBar::VoiceRecordBar(
|
||||||
, _startTimer([=] { startRecording(); })
|
, _startTimer([=] { startRecording(); })
|
||||||
, _message(
|
, _message(
|
||||||
st::historyRecordTextStyle,
|
st::historyRecordTextStyle,
|
||||||
tr::lng_record_cancel(tr::now),
|
(!descriptor.customCancelText.isEmpty()
|
||||||
|
? descriptor.customCancelText
|
||||||
|
: tr::lng_record_cancel(tr::now)),
|
||||||
TextParseOptions{ TextParseMultiline, 0, 0, Qt::LayoutDirectionAuto })
|
TextParseOptions{ TextParseMultiline, 0, 0, Qt::LayoutDirectionAuto })
|
||||||
, _lockFromBottom(descriptor.lockFromBottom)
|
, _lockFromBottom(descriptor.lockFromBottom)
|
||||||
, _cancelFont(st::historyRecordFont) {
|
, _cancelFont(st::historyRecordFont) {
|
||||||
|
|
|
@ -43,6 +43,7 @@ struct VoiceRecordBarDescriptor {
|
||||||
not_null<Ui::RpWidget*> outerContainer;
|
not_null<Ui::RpWidget*> outerContainer;
|
||||||
std::shared_ptr<ChatHelpers::Show> show;
|
std::shared_ptr<ChatHelpers::Show> show;
|
||||||
std::shared_ptr<Ui::SendButton> send;
|
std::shared_ptr<Ui::SendButton> send;
|
||||||
|
QString customCancelText;
|
||||||
const style::RecordBar *stOverride = nullptr;
|
const style::RecordBar *stOverride = nullptr;
|
||||||
int recorderHeight = 0;
|
int recorderHeight = 0;
|
||||||
bool lockFromBottom = false;
|
bool lockFromBottom = false;
|
||||||
|
|
|
@ -86,6 +86,7 @@ ReplyArea::ReplyArea(not_null<Controller*> controller)
|
||||||
.sendMenuType = SendMenu::Type::SilentOnly,
|
.sendMenuType = SendMenu::Type::SilentOnly,
|
||||||
.stickerOrEmojiChosen = _controller->stickerOrEmojiChosen(),
|
.stickerOrEmojiChosen = _controller->stickerOrEmojiChosen(),
|
||||||
.customPlaceholder = tr::lng_story_reply_ph(),
|
.customPlaceholder = tr::lng_story_reply_ph(),
|
||||||
|
.voiceCustomCancelText = tr::lng_record_cancel_stories(tr::now),
|
||||||
.voiceLockFromBottom = true,
|
.voiceLockFromBottom = true,
|
||||||
.features = {
|
.features = {
|
||||||
.sendAs = false,
|
.sendAs = false,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user