mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Removed redundant constructor from HistoryView::ComposeControls.
This commit is contained in:
parent
c4fc43ccc0
commit
cd59f1d576
4 changed files with 20 additions and 30 deletions
|
@ -770,22 +770,6 @@ MessageToEdit FieldHeader::queryToEdit() {
|
|||
};
|
||||
}
|
||||
|
||||
ComposeControls::ComposeControls(
|
||||
not_null<Ui::RpWidget*> parent,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Fn<void(not_null<DocumentData*>)> unavailableEmojiPasted,
|
||||
Mode mode,
|
||||
SendMenu::Type sendMenuType)
|
||||
: ComposeControls(parent, ComposeControlsDescriptor{
|
||||
.show = controller->uiShow(),
|
||||
.unavailableEmojiPasted = std::move(unavailableEmojiPasted),
|
||||
.mode = mode,
|
||||
.sendMenuType = sendMenuType,
|
||||
.regularWindow = controller,
|
||||
.stickerOrEmojiChosen = controller->stickerOrEmojiChosen(),
|
||||
}) {
|
||||
}
|
||||
|
||||
ComposeControls::ComposeControls(
|
||||
not_null<Ui::RpWidget*> parent,
|
||||
ComposeControlsDescriptor descriptor)
|
||||
|
|
|
@ -128,12 +128,6 @@ public:
|
|||
using FieldHistoryAction = Ui::InputField::HistoryAction;
|
||||
using Mode = ComposeControlsMode;
|
||||
|
||||
ComposeControls(
|
||||
not_null<Ui::RpWidget*> parent,
|
||||
not_null<Window::SessionController*> controller,
|
||||
Fn<void(not_null<DocumentData*>)> unavailableEmojiPasted,
|
||||
Mode mode,
|
||||
SendMenu::Type sendMenuType);
|
||||
ComposeControls(
|
||||
not_null<Ui::RpWidget*> parent,
|
||||
ComposeControlsDescriptor descriptor);
|
||||
|
|
|
@ -215,10 +215,16 @@ RepliesWidget::RepliesWidget(
|
|||
, _topBarShadow(this)
|
||||
, _composeControls(std::make_unique<ComposeControls>(
|
||||
this,
|
||||
controller,
|
||||
[=](not_null<DocumentData*> emoji) { listShowPremiumToast(emoji); },
|
||||
ComposeControls::Mode::Normal,
|
||||
SendMenu::Type::SilentOnly))
|
||||
ComposeControlsDescriptor{
|
||||
.show = controller->uiShow(),
|
||||
.unavailableEmojiPasted = [=](not_null<DocumentData*> emoji) {
|
||||
listShowPremiumToast(emoji);
|
||||
},
|
||||
.mode = ComposeControls::Mode::Normal,
|
||||
.sendMenuType = SendMenu::Type::SilentOnly,
|
||||
.regularWindow = controller,
|
||||
.stickerOrEmojiChosen = controller->stickerOrEmojiChosen(),
|
||||
}))
|
||||
, _translateBar(std::make_unique<TranslateBar>(this, controller, history))
|
||||
, _scroll(std::make_unique<Ui::ScrollArea>(
|
||||
this,
|
||||
|
|
|
@ -80,10 +80,16 @@ ScheduledWidget::ScheduledWidget(
|
|||
, _topBarShadow(this)
|
||||
, _composeControls(std::make_unique<ComposeControls>(
|
||||
this,
|
||||
controller,
|
||||
[=](not_null<DocumentData*> emoji) { listShowPremiumToast(emoji); },
|
||||
ComposeControls::Mode::Scheduled,
|
||||
SendMenu::Type::Disabled))
|
||||
ComposeControlsDescriptor{
|
||||
.show = controller->uiShow(),
|
||||
.unavailableEmojiPasted = [=](not_null<DocumentData*> emoji) {
|
||||
listShowPremiumToast(emoji);
|
||||
},
|
||||
.mode = ComposeControls::Mode::Scheduled,
|
||||
.sendMenuType = SendMenu::Type::Disabled,
|
||||
.regularWindow = controller,
|
||||
.stickerOrEmojiChosen = controller->stickerOrEmojiChosen(),
|
||||
}))
|
||||
, _cornerButtons(
|
||||
_scroll.data(),
|
||||
controller->chatStyle(),
|
||||
|
|
Loading…
Add table
Reference in a new issue