mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 06:55:58 +00:00
Wrapped raw SectionMemento with unique_ptr.
This commit is contained in:
@@ -123,7 +123,7 @@ PollData *AbstractController::poll() const {
|
||||
}
|
||||
|
||||
void AbstractController::showSection(
|
||||
Window::SectionMemento &&memento,
|
||||
std::unique_ptr<Window::SectionMemento> &&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<Memento>(peer, section),
|
||||
Window::SectionShow(
|
||||
Window::SectionShow::Way::Backward,
|
||||
anim::type::instant,
|
||||
@@ -261,9 +261,9 @@ void Controller::saveSearchState(not_null<ContentMemento*> memento) {
|
||||
}
|
||||
|
||||
void Controller::showSection(
|
||||
Window::SectionMemento &&memento,
|
||||
std::unique_ptr<Window::SectionMemento> &&memento,
|
||||
const Window::SectionShow ¶ms) {
|
||||
if (!_widget->showInternal(&memento, params)) {
|
||||
if (!_widget->showInternal(memento.get(), params)) {
|
||||
AbstractController::showSection(std::move(memento), params);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user