mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 08:55:59 +00:00
Wrapped raw SectionMemento with unique_ptr.
This commit is contained in:
@@ -687,7 +687,7 @@ HistoryWidget::HistoryWidget(
|
||||
cancelReply(lastKeyboardUsed);
|
||||
crl::on_main(this, [=, history = action.history]{
|
||||
controller->showSection(
|
||||
HistoryView::ScheduledMemento(history));
|
||||
std::make_unique<HistoryView::ScheduledMemento>(history));
|
||||
});
|
||||
} else {
|
||||
fastShowAtEnd(action.history);
|
||||
@@ -1505,7 +1505,7 @@ bool HistoryWidget::notify_switchInlineBotButtonReceived(const QString &query, U
|
||||
} else if (to.section == Section::Scheduled) {
|
||||
history->setDraft(Data::DraftKey::Scheduled(), std::move(draft));
|
||||
controller()->showSection(
|
||||
HistoryView::ScheduledMemento(history));
|
||||
std::make_unique<HistoryView::ScheduledMemento>(history));
|
||||
} else {
|
||||
history->setLocalDraft(std::move(draft));
|
||||
if (history == _history) {
|
||||
@@ -2073,7 +2073,7 @@ void HistoryWidget::refreshScheduledToggle() {
|
||||
_scheduled->show();
|
||||
_scheduled->addClickHandler([=] {
|
||||
controller()->showSection(
|
||||
HistoryView::ScheduledMemento(_history));
|
||||
std::make_unique<HistoryView::ScheduledMemento>(_history));
|
||||
});
|
||||
orderWidgets(); // Raise drag areas to the top.
|
||||
} else if (_scheduled && !has) {
|
||||
@@ -3883,7 +3883,7 @@ bool HistoryWidget::pushTabbedSelectorToThirdSection(
|
||||
Core::App().settings().setTabbedReplacedWithInfo(false);
|
||||
controller()->resizeForThirdSection();
|
||||
controller()->showSection(
|
||||
ChatHelpers::TabbedMemento(),
|
||||
std::make_unique<ChatHelpers::TabbedMemento>(),
|
||||
params.withThirdColumn());
|
||||
return true;
|
||||
}
|
||||
@@ -5382,7 +5382,7 @@ void HistoryWidget::refreshPinnedBarButton(bool many) {
|
||||
const auto id = _pinnedTracker->currentMessageId();
|
||||
if (id.message) {
|
||||
controller()->showSection(
|
||||
HistoryView::PinnedMemento(
|
||||
std::make_unique<HistoryView::PinnedMemento>(
|
||||
_history,
|
||||
((!_migrated || id.message.channel)
|
||||
? id.message.msg
|
||||
|
Reference in New Issue
Block a user