2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 23:15:59 +00:00

Use internal section stack in Info::WrapWidget.

This commit is contained in:
John Preston
2017-10-03 14:05:58 +01:00
parent 525cde3498
commit 93c15e5ee6
63 changed files with 736 additions and 429 deletions

View File

@@ -251,89 +251,70 @@ void Controller::updateColumnLayout() {
void Controller::showPeerHistory(
PeerId peerId,
Ui::ShowWay way,
MsgId msgId,
anim::type animated,
anim::activation activation) {
Ui::showPeerHistory(
const SectionShow &params,
MsgId msgId) {
App::main()->ui_showPeerHistory(
peerId,
msgId,
way,
animated,
activation);
params,
msgId);
}
void Controller::showPeerHistory(
not_null<PeerData*> peer,
Ui::ShowWay way,
MsgId msgId,
anim::type animated,
anim::activation activation) {
const SectionShow &params,
MsgId msgId) {
showPeerHistory(
peer->id,
way,
msgId,
animated,
activation);
params,
msgId);
}
void Controller::showPeerHistory(
not_null<History*> history,
Ui::ShowWay way,
MsgId msgId,
anim::type animated,
anim::activation activation) {
const SectionShow &params,
MsgId msgId) {
showPeerHistory(
history->peer->id,
way,
msgId,
animated,
activation);
params,
msgId);
}
void Controller::showPeerInfo(
PeerId peerId,
anim::type animated,
anim::activation activation) {
const SectionShow &params) {
if (Adaptive::ThreeColumn()
&& !Auth().data().thirdSectionInfoEnabled()) {
Auth().data().setThirdSectionInfoEnabled(true);
Auth().saveDataDelayed();
}
showSection(
Info::Memento(peerId),
animated,
activation);
showSection(Info::Memento(peerId), params);
}
void Controller::showPeerInfo(
not_null<PeerData*> peer,
anim::type animated,
anim::activation activation) {
showPeerInfo(peer->id, animated, activation);
const SectionShow &params) {
showPeerInfo(peer->id, params);
}
void Controller::showPeerInfo(
not_null<History*> history,
anim::type animated,
anim::activation activation) {
showPeerInfo(history->peer->id, animated, activation);
const SectionShow &params) {
showPeerInfo(history->peer->id, params);
}
void Controller::showSection(
SectionMemento &&memento,
anim::type animated,
anim::activation activation) {
App::main()->showSection(
std::move(memento),
animated,
activation);
const SectionShow &params) {
if (App::wnd()->showSectionInExistingLayer(
&memento,
params)) {
return;
}
App::main()->showSection(std::move(memento), params);
}
void Controller::showBackFromStack(
anim::type animated,
anim::activation activation) {
chats()->showBackFromStack(animated, activation);
void Controller::showBackFromStack(const SectionShow &params) {
chats()->showBackFromStack(params);
}
void Controller::showSpecialLayer(