diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index 4dc9a726c7..577d0b995e 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -3412,7 +3412,7 @@ void ApiWrap::jumpToHistoryDate(not_null peer, const QDate &date) { // requestMessageAfterDate(feed, date, [=](Data::MessagePosition result) { // Ui::hideLayer(); // App::wnd()->sessionController()->showSection( -// HistoryFeed::Memento(feed, result)); +// std::make_unique(feed, result)); // }); //} diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp index 0b0801f486..a4df0596a0 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp @@ -1000,13 +1000,15 @@ void Controller::fillManageSection() { st::infoIconBlacklist); } if (hasRecentActions) { + auto callback = [=] { + _navigation->showSection( + std::make_unique(channel)); + }; AddButtonWithCount( _controls.buttonsLayout, tr::lng_manage_peer_recent_actions(), rpl::single(QString()), //Empty count. - [=] { - _navigation->showSection(AdminLog::SectionMemento(channel)); - }, + std::move(callback), st::infoIconRecentActions); } diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp index 79320c9e1f..4863ea4cec 100644 --- a/Telegram/SourceFiles/core/update_checker.cpp +++ b/Telegram/SourceFiles/core/update_checker.cpp @@ -1591,7 +1591,7 @@ void UpdateApplication() { if (const auto window = App::wnd()) { if (const auto controller = window->sessionController()) { controller->showSection( - Info::Memento( + std::make_unique( Info::Settings::Tag{ controller->session().user() }, Info::Section::SettingsType::Advanced), Window::SectionShow()); diff --git a/Telegram/SourceFiles/data/data_shared_media.cpp b/Telegram/SourceFiles/data/data_shared_media.cpp index 8497ce8f79..9c988dd3bf 100644 --- a/Telegram/SourceFiles/data/data_shared_media.cpp +++ b/Telegram/SourceFiles/data/data_shared_media.cpp @@ -56,7 +56,7 @@ void SharedMediaShowOverview( return; } } - windows.front()->showSection(Info::Memento( + windows.front()->showSection(std::make_unique( history->peer, Info::Section(type))); } diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index fd08fb769e..ecd92806d1 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -1776,7 +1776,7 @@ bool Widget::onCancelSearch() { if (const auto peer = _searchInChat.peer()) { Ui::showPeerHistory(peer, ShowAtUnreadMsgId); //} else if (const auto feed = _searchInChat.feed()) { // #feed - // controller()->showSection(HistoryFeed::Memento(feed)); + // controller()->showSection(std::make_unique(feed)); } else { Unexpected("Empty key in onCancelSearch()."); } @@ -1800,7 +1800,7 @@ void Widget::onCancelSearchInChat() { if (const auto peer = _searchInChat.peer()) { Ui::showPeerHistory(peer, ShowAtUnreadMsgId); //} else if (const auto feed = _searchInChat.feed()) { // #feed - // controller()->showSection(HistoryFeed::Memento(feed)); + // controller()->showSection(std::make_unique(feed)); } else { Unexpected("Empty key in onCancelSearchInPeer()."); } diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index eca6160eae..10e3a9064c 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -687,7 +687,7 @@ HistoryWidget::HistoryWidget( cancelReply(lastKeyboardUsed); crl::on_main(this, [=, history = action.history]{ controller->showSection( - HistoryView::ScheduledMemento(history)); + std::make_unique(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(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(_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(), 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( _history, ((!_migrated || id.message.channel) ? id.message.msg 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 3bea246b34..c848c00d7a 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -1736,7 +1736,7 @@ bool ComposeControls::pushTabbedSelectorToThirdSection( &st::historyRecordVoiceRippleBgActive); _window->resizeForThirdSection(); _window->showSection( - ChatHelpers::TabbedMemento(), + std::make_unique(), params.withThirdColumn()); return true; } diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index ebadf71335..4c74a042cb 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -493,15 +493,15 @@ void TopBarWidget::infoClicked() { } else if (key.folder()) { _controller->closeFolder(); //} else if (const auto feed = _activeChat.feed()) { // #feed - // _controller->showSection(Info::Memento( + // _controller->showSection(std::make_unique( // feed, // Info::Section(Info::Section::Type::Profile))); } else if (key.peer()->isSelf()) { - _controller->showSection(Info::Memento( + _controller->showSection(std::make_unique( key.peer(), Info::Section(Storage::SharedMediaType::Photo))); } else if (key.peer()->isRepliesChat()) { - _controller->showSection(Info::Memento( + _controller->showSection(std::make_unique( key.peer(), Info::Section(Storage::SharedMediaType::Photo))); } else { diff --git a/Telegram/SourceFiles/info/feed/info_feed_channels.cpp b/Telegram/SourceFiles/info/feed/info_feed_channels.cpp index ee1acb7537..0d636df826 100644 --- a/Telegram/SourceFiles/info/feed/info_feed_channels.cpp +++ b/Telegram/SourceFiles/info/feed/info_feed_channels.cpp @@ -281,7 +281,7 @@ void Channels::showChannelsWithSearch(bool withSearch) { auto mementoStack = std::vector>(); mementoStack.push_back(std::move(contentMemento)); _controller->showSection( - Info::Memento(std::move(mementoStack))); + std::make_unique(std::move(mementoStack))); } void Channels::visibleTopBottomUpdated( diff --git a/Telegram/SourceFiles/info/feed/info_feed_cover.cpp b/Telegram/SourceFiles/info/feed/info_feed_cover.cpp index fea34f5705..1ec2be9e8a 100644 --- a/Telegram/SourceFiles/info/feed/info_feed_cover.cpp +++ b/Telegram/SourceFiles/info/feed/info_feed_cover.cpp @@ -84,7 +84,7 @@ void Cover::refreshStatusText() { }(); _status->setRichText(textcmdLink(1, statusText)); _status->setLink(1, std::make_shared([=] { - _controller->showSection(Info::Memento( + _controller->showSection(std::make_unique( _feed, Section::Type::Channels)); })); diff --git a/Telegram/SourceFiles/info/info_controller.cpp b/Telegram/SourceFiles/info/info_controller.cpp index 9def98def0..b7ff86b31f 100644 --- a/Telegram/SourceFiles/info/info_controller.cpp +++ b/Telegram/SourceFiles/info/info_controller.cpp @@ -123,7 +123,7 @@ PollData *AbstractController::poll() const { } void AbstractController::showSection( - Window::SectionMemento &&memento, + std::unique_ptr &&memento, const Window::SectionShow ¶ms) { return parentController()->showSection(std::move(memento), params); } @@ -170,7 +170,7 @@ void Controller::setupMigrationViewer() { const auto section = _section; InvokeQueued(_widget, [=] { window->showSection( - Memento(peer, section), + std::make_unique(peer, section), Window::SectionShow( Window::SectionShow::Way::Backward, anim::type::instant, @@ -261,9 +261,9 @@ void Controller::saveSearchState(not_null memento) { } void Controller::showSection( - Window::SectionMemento &&memento, + std::unique_ptr &&memento, const Window::SectionShow ¶ms) { - if (!_widget->showInternal(&memento, params)) { + if (!_widget->showInternal(memento.get(), params)) { AbstractController::showSection(std::move(memento), params); } } diff --git a/Telegram/SourceFiles/info/info_controller.h b/Telegram/SourceFiles/info/info_controller.h index c0f117efe5..44926fbeef 100644 --- a/Telegram/SourceFiles/info/info_controller.h +++ b/Telegram/SourceFiles/info/info_controller.h @@ -136,7 +136,7 @@ public: virtual rpl::producer mediaSourceQueryValue() const; void showSection( - Window::SectionMemento &&memento, + std::unique_ptr &&memento, const Window::SectionShow ¶ms = Window::SectionShow()) override; void showBackFromStack( const Window::SectionShow ¶ms = Window::SectionShow()) override; @@ -202,7 +202,7 @@ public: void saveSearchState(not_null memento); void showSection( - Window::SectionMemento &&memento, + std::unique_ptr &&memento, const Window::SectionShow ¶ms = Window::SectionShow()) override; void showBackFromStack( const Window::SectionShow ¶ms = Window::SectionShow()) override; diff --git a/Telegram/SourceFiles/info/info_layer_widget.cpp b/Telegram/SourceFiles/info/info_layer_widget.cpp index 1627b1383f..9460b7f05f 100644 --- a/Telegram/SourceFiles/info/info_layer_widget.cpp +++ b/Telegram/SourceFiles/info/info_layer_widget.cpp @@ -106,7 +106,7 @@ void LayerWidget::parentResized() { Ui::FocusPersister persister(this); restoreFloatPlayerDelegate(); - auto memento = MoveMemento(std::move(_content)); + auto memento = std::make_unique(std::move(_content)); // We want to call hideSpecialLayer synchronously to avoid glitches, // but we can't destroy LayerStackWidget from its' resizeEvent, diff --git a/Telegram/SourceFiles/info/info_memento.cpp b/Telegram/SourceFiles/info/info_memento.cpp index 8f32c15782..ba15952f5f 100644 --- a/Telegram/SourceFiles/info/info_memento.cpp +++ b/Telegram/SourceFiles/info/info_memento.cpp @@ -101,8 +101,8 @@ Section Memento::DefaultSection(not_null peer) { // return Section(Section::Type::Profile); //} -Memento Memento::Default(not_null peer) { - return Memento(peer, DefaultSection(peer)); +std::unique_ptr Memento::Default(not_null peer) { + return std::make_unique(peer, DefaultSection(peer)); } // // #feed //Memento Memento::Default(Dialogs::Key key) { diff --git a/Telegram/SourceFiles/info/info_memento.h b/Telegram/SourceFiles/info/info_memento.h index c317116cb4..bcd9b6aac8 100644 --- a/Telegram/SourceFiles/info/info_memento.h +++ b/Telegram/SourceFiles/info/info_memento.h @@ -62,7 +62,7 @@ public: static Section DefaultSection(not_null peer); //static Section DefaultSection(Dialogs::Key key); // #feed - static Memento Default(not_null peer); + static std::unique_ptr Default(not_null peer); //static Memento Default(Dialogs::Key key); // #feed ~Memento(); diff --git a/Telegram/SourceFiles/info/media/info_media_buttons.h b/Telegram/SourceFiles/info/media/info_media_buttons.h index eaf2154ade..78e199c023 100644 --- a/Telegram/SourceFiles/info/media/info_media_buttons.h +++ b/Telegram/SourceFiles/info/media/info_media_buttons.h @@ -92,7 +92,7 @@ inline auto AddButton( tracker)->entity(); result->addClickHandler([=] { navigation->showSection( - Info::Memento(peer, Section(type))); + std::make_unique(peer, Section(type))); }); return result; }; @@ -111,7 +111,7 @@ inline auto AddCommonGroupsButton( tracker)->entity(); result->addClickHandler([=] { navigation->showSection( - Info::Memento(user, Section::Type::CommonGroups)); + std::make_unique(user, Section::Type::CommonGroups)); }); return result; }; diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index 1a0e78b856..1413d3ef86 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -843,7 +843,7 @@ object_ptr SetupChannelMembers( lt_count_decimal, MembersCountValue(channel) | tr::to_count()); auto membersCallback = [=] { - controller->showSection(Info::Memento( + controller->showSection(std::make_unique( channel, Section::Type::Members)); }; diff --git a/Telegram/SourceFiles/info/profile/info_profile_inner_widget.cpp b/Telegram/SourceFiles/info/profile/info_profile_inner_widget.cpp index 77e6648b94..e55010909f 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_inner_widget.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_inner_widget.cpp @@ -81,7 +81,8 @@ object_ptr InnerWidget::setupContent( _controller->parentController())); _cover->showSection( ) | rpl::start_with_next([=](Section section) { - _controller->showSection(Info::Memento(_peer, section)); + _controller->showSection( + std::make_unique(_peer, section)); }, _cover->lifetime()); _cover->setOnlineCount(rpl::single(0)); auto details = SetupDetails(_controller, parent, _peer); diff --git a/Telegram/SourceFiles/info/profile/info_profile_members.cpp b/Telegram/SourceFiles/info/profile/info_profile_members.cpp index d95ed2d0b4..0923499d3a 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_members.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_members.cpp @@ -349,7 +349,7 @@ void Members::showMembersWithSearch(bool withSearch) { auto mementoStack = std::vector>(); mementoStack.push_back(std::move(contentMemento)); _controller->showSection( - Info::Memento(std::move(mementoStack))); + std::make_unique(std::move(mementoStack))); } //void Members::toggleSearch(anim::type animated) { diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 6802e12ba3..1d83b39ae9 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -192,8 +192,8 @@ public: StackItemType type() const override { return SectionStackItem; } - Window::SectionMemento *memento() const { - return _memento.get(); + std::unique_ptr takeMemento() { + return std::move(_memento); } private: @@ -1599,10 +1599,10 @@ void MainWidget::saveSectionInStack() { } void MainWidget::showSection( - Window::SectionMemento &&memento, + std::unique_ptr &&memento, const SectionShow ¶ms) { if (_mainSection && _mainSection->showInternal( - &memento, + memento.get(), params)) { if (const auto entry = _mainSection->activeChat(); entry.key) { _controller->setActiveChatEntry(entry); @@ -1720,7 +1720,7 @@ Window::SectionSlideParams MainWidget::prepareDialogsAnimation() { } void MainWidget::showNewSection( - Window::SectionMemento &&memento, + std::unique_ptr &&memento, const SectionShow ¶ms) { using Column = Window::Column; @@ -1732,7 +1732,7 @@ void MainWidget::showNewSection( st::columnMinimalWidthThird, height() - thirdSectionTop); auto newThirdSection = (Adaptive::ThreeColumn() && params.thirdColumn) - ? memento.createWidget( + ? memento->createWidget( this, _controller, Column::Third, @@ -1741,7 +1741,7 @@ void MainWidget::showNewSection( const auto layerRect = parentWidget()->rect(); if (newThirdSection) { saveInStack = false; - } else if (auto layer = memento.createLayer(_controller, layerRect)) { + } else if (auto layer = memento->createLayer(_controller, layerRect)) { if (params.activation != anim::activation::background) { Ui::hideLayer(anim::type::instant); } @@ -1766,7 +1766,7 @@ void MainWidget::showNewSection( height() - mainSectionTop); auto newMainSection = newThirdSection ? nullptr - : memento.createWidget( + : memento->createWidget( this, _controller, Adaptive::OneColumn() ? Column::First : Column::Second, @@ -1777,7 +1777,7 @@ void MainWidget::showNewSection( if (_a_show.animating() || Core::App().passcodeLocked() || (params.animated == anim::type::instant) - || memento.instant()) { + || memento->instant()) { return false; } if (!Adaptive::OneColumn() && params.way == SectionShow::Way::ClearStack) { @@ -1908,12 +1908,12 @@ void MainWidget::showBackFromStack( } else if (item->type() == SectionStackItem) { auto sectionItem = static_cast(item.get()); showNewSection( - std::move(*sectionItem->memento()), + sectionItem->takeMemento(), params.withWay(SectionShow::Way::Backward)); } if (_thirdSectionFromStack && _thirdSection) { _controller->showSection( - std::move(*base::take(_thirdSectionFromStack)), + base::take(_thirdSectionFromStack), SectionShow( SectionShow::Way::ClearStack, anim::type::instant, @@ -2455,7 +2455,7 @@ void MainWidget::updateThirdColumnToCurrentChat( } _controller->showSection( - std::move(*thirdSectionForCurrentMainSection(key)), + thirdSectionForCurrentMainSection(key), params.withThirdColumn()); }; auto switchTabbedFast = [&](not_null peer) { diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 6a1f0e666c..3575dea9ec 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -134,7 +134,7 @@ public: int backgroundFromY() const; void showSection( - Window::SectionMemento &&memento, + std::unique_ptr &&memento, const SectionShow ¶ms); void updateColumnLayout(); bool stackIsEmpty() const; @@ -271,7 +271,7 @@ private: Window::SectionSlideParams prepareShowAnimation( bool willHaveTopBarShadow); void showNewSection( - Window::SectionMemento &&memento, + std::unique_ptr &&memento, const SectionShow ¶ms); void dropMainSection(Window::SectionWidget *widget); diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index e6d7725067..00f822f8e4 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -650,7 +650,7 @@ void Manager::openNotificationMessage( Ui::showPeerHistory(history, messageId); //} else if (messageFeed) { // #feed // App::wnd()->sessionController()->showSection( - // HistoryFeed::Memento(messageFeed)); + // std::make_unique(messageFeed)); } else { Ui::showPeerHistory(history, ShowAtUnreadMsgId); } diff --git a/Telegram/SourceFiles/window/window_peer_menu.cpp b/Telegram/SourceFiles/window/window_peer_menu.cpp index 9e5f7653f2..1efe6f16d9 100644 --- a/Telegram/SourceFiles/window/window_peer_menu.cpp +++ b/Telegram/SourceFiles/window/window_peer_menu.cpp @@ -714,7 +714,7 @@ void Filler::addTogglesForArchive() { // const auto controller = _controller; // const auto feed = _feed; // _addAction(tr::lng_context_view_feed_info(tr::now), [=] { -// controller->showSection(Info::Memento( +// controller->showSection(std::make_unique( // feed, // Info::Section(Info::Section::Type::Profile))); // }); diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index 56a7c2e193..b6e13be535 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -253,12 +253,12 @@ void SessionNavigation::showRepliesForMessage( const auto channelId = history->channelId(); //const auto item = _session->data().message(channelId, rootId); //if (!commentId && (!item || !item->repliesAreComments())) { - // showSection(HistoryView::RepliesMemento(history, rootId)); + // showSection(std::make_unique(history, rootId)); // return; //} else if (const auto id = item ? item->commentsItemId() : FullMsgId()) { // if (const auto commentsItem = _session->data().message(id)) { // showSection( - // HistoryView::RepliesMemento(commentsItem)); + // std::make_unique(commentsItem)); // return; // } //} @@ -314,8 +314,9 @@ void SessionNavigation::showRepliesForMessage( post->setRepliesOutboxReadTill(readTill->v); } } - showSection( - HistoryView::RepliesMemento(item, commentId)); + showSection(std::make_unique( + item, + commentId)); } }); }).fail([=](const RPCError &error) { @@ -341,7 +342,7 @@ void SessionNavigation::showPeerInfo( // Core::App().settings().setThirdSectionInfoEnabled(true); // Core::App().saveSettingsDelayed(); //} - showSection(Info::Memento(peer), params); + showSection(std::make_unique(peer), params); } void SessionNavigation::showPeerInfo( @@ -374,7 +375,7 @@ void SessionNavigation::showSettings( Settings::Type type, const SectionShow ¶ms) { showSection( - Info::Memento( + std::make_unique( Info::Settings::Tag{ _session->user() }, Info::Section(type)), params); @@ -388,7 +389,7 @@ void SessionNavigation::showPollResults( not_null poll, FullMsgId contextId, const SectionShow ¶ms) { - showSection(Info::Memento(poll, contextId), params); + showSection(std::make_unique(poll, contextId), params); } SessionController::SessionController( @@ -639,9 +640,9 @@ bool SessionController::jumpToChatListEntry(Dialogs::RowDescriptor row) { return true; //} else if (const auto feed = row.key.feed()) { // #feed // if (const auto item = session().data().message(row.fullId)) { - // showSection(HistoryFeed::Memento(feed, item->position())); + // showSection(std::make_unique(feed, item->position())); // } else { - // showSection(HistoryFeed::Memento(feed)); + // showSection(std::make_unique(feed)); // } } return false; @@ -1086,10 +1087,10 @@ void SessionController::showPeerHistory( } void SessionController::showSection( - SectionMemento &&memento, + std::unique_ptr &&memento, const SectionShow ¶ms) { if (!params.thirdColumn && widget()->showSectionInExistingLayer( - &memento, + memento.get(), params)) { return; } diff --git a/Telegram/SourceFiles/window/window_session_controller.h b/Telegram/SourceFiles/window/window_session_controller.h index 900ad24875..88f563031c 100644 --- a/Telegram/SourceFiles/window/window_session_controller.h +++ b/Telegram/SourceFiles/window/window_session_controller.h @@ -132,7 +132,7 @@ public: Main::Session &session() const; virtual void showSection( - SectionMemento &&memento, + std::unique_ptr &&memento, const SectionShow ¶ms = SectionShow()) = 0; virtual void showBackFromStack( const SectionShow ¶ms = SectionShow()) = 0; @@ -301,7 +301,7 @@ public: bool confirmedLeaveOther = false); void showSection( - SectionMemento &&memento, + std::unique_ptr &&memento, const SectionShow ¶ms = SectionShow()) override; void showBackFromStack( const SectionShow ¶ms = SectionShow()) override;