mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Use correct reply placeholder in stories view.
This commit is contained in:
@@ -971,12 +971,15 @@ ComposeControls::ComposeControls(
|
||||
, _tabbedSelectorToggle(Ui::CreateChild<Ui::EmojiButton>(
|
||||
_wrap.get(),
|
||||
_st.emoji))
|
||||
, _fieldCustomPlaceholder(std::move(descriptor.customPlaceholder))
|
||||
, _field(
|
||||
Ui::CreateChild<Ui::InputField>(
|
||||
_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<Ui::IconButton>(
|
||||
_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();
|
||||
|
@@ -102,6 +102,7 @@ struct ComposeControlsDescriptor {
|
||||
SendMenu::Type sendMenuType = {};
|
||||
Window::SessionController *regularWindow = nullptr;
|
||||
rpl::producer<ChatHelpers::FileChosen> stickerOrEmojiChosen;
|
||||
rpl::producer<QString> customPlaceholder;
|
||||
bool voiceLockFromBottom = false;
|
||||
ChatHelpers::ComposeFeatures features;
|
||||
};
|
||||
@@ -353,6 +354,7 @@ private:
|
||||
const not_null<Ui::IconButton*> _attachToggle;
|
||||
std::unique_ptr<Ui::IconButton> _replaceMedia;
|
||||
const not_null<Ui::EmojiButton*> _tabbedSelectorToggle;
|
||||
rpl::producer<QString> _fieldCustomPlaceholder;
|
||||
const not_null<Ui::InputField*> _field;
|
||||
Ui::IconButton * const _botCommandStart = nullptr;
|
||||
std::unique_ptr<Ui::SendAsButton> _sendAs;
|
||||
|
@@ -85,6 +85,7 @@ ReplyArea::ReplyArea(not_null<Controller*> controller)
|
||||
.mode = HistoryView::ComposeControlsMode::Normal,
|
||||
.sendMenuType = SendMenu::Type::SilentOnly,
|
||||
.stickerOrEmojiChosen = _controller->stickerOrEmojiChosen(),
|
||||
.customPlaceholder = tr::lng_story_reply_ph(),
|
||||
.voiceLockFromBottom = true,
|
||||
.features = {
|
||||
.sendAs = false,
|
||||
|
Reference in New Issue
Block a user