diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 81a75e5a6..68a00520e 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2044,6 +2044,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_broadcast_ph" = "Broadcast a message..."; "lng_broadcast_silent_ph" = "Silent broadcast..."; "lng_send_anonymous_ph" = "Send anonymously..."; +"lng_story_reply_ph" = "Reply privately..."; "lng_send_text_no" = "Text not allowed."; "lng_send_text_no_about" = "The admins of this group only allow sending {types}."; "lng_send_text_type_and_last" = "{types} and {last}"; diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index 089767c2c..e1b32aa7d 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -971,12 +971,15 @@ ComposeControls::ComposeControls( , _tabbedSelectorToggle(Ui::CreateChild( _wrap.get(), _st.emoji)) +, _fieldCustomPlaceholder(std::move(descriptor.customPlaceholder)) , _field( Ui::CreateChild( _wrap.get(), _st.field, Ui::InputField::Mode::MultiLine, - tr::lng_message_ph())) + (_fieldCustomPlaceholder + ? rpl::duplicate(_fieldCustomPlaceholder) + : tr::lng_message_ph()))) , _botCommandStart(_features.botCommandSend ? Ui::CreateChild( _wrap.get(), @@ -1816,7 +1819,9 @@ void ComposeControls::updateFieldPlaceholder() { } _field->setPlaceholder([&] { - if (isEditingMessage()) { + if (_fieldCustomPlaceholder) { + return rpl::duplicate(_fieldCustomPlaceholder); + } else if (isEditingMessage()) { return tr::lng_edit_message_text(); } else if (!_history) { return tr::lng_message_ph(); diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.h b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.h index fa63a8b3d..518782954 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.h +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.h @@ -102,6 +102,7 @@ struct ComposeControlsDescriptor { SendMenu::Type sendMenuType = {}; Window::SessionController *regularWindow = nullptr; rpl::producer stickerOrEmojiChosen; + rpl::producer customPlaceholder; bool voiceLockFromBottom = false; ChatHelpers::ComposeFeatures features; }; @@ -353,6 +354,7 @@ private: const not_null _attachToggle; std::unique_ptr _replaceMedia; const not_null _tabbedSelectorToggle; + rpl::producer _fieldCustomPlaceholder; const not_null _field; Ui::IconButton * const _botCommandStart = nullptr; std::unique_ptr _sendAs; diff --git a/Telegram/SourceFiles/media/stories/media_stories_reply.cpp b/Telegram/SourceFiles/media/stories/media_stories_reply.cpp index d032533b3..9fa53b529 100644 --- a/Telegram/SourceFiles/media/stories/media_stories_reply.cpp +++ b/Telegram/SourceFiles/media/stories/media_stories_reply.cpp @@ -85,6 +85,7 @@ ReplyArea::ReplyArea(not_null controller) .mode = HistoryView::ComposeControlsMode::Normal, .sendMenuType = SendMenu::Type::SilentOnly, .stickerOrEmojiChosen = _controller->stickerOrEmojiChosen(), + .customPlaceholder = tr::lng_story_reply_ph(), .voiceLockFromBottom = true, .features = { .sendAs = false,