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

Improve layer / section exchange for Info.

This commit is contained in:
John Preston
2017-09-20 13:23:57 +03:00
parent b7077eb71d
commit f4d9618487
27 changed files with 426 additions and 214 deletions

View File

@@ -257,64 +257,93 @@ void Controller::updateColumnLayout() {
void Controller::showPeerHistory(
PeerId peerId,
Ui::ShowWay way,
MsgId msgId) {
Ui::showPeerHistory(peerId, msgId, way);
MsgId msgId,
anim::type animated,
anim::activation activation) {
Ui::showPeerHistory(
peerId,
msgId,
way,
animated,
activation);
}
void Controller::showPeerHistory(
not_null<PeerData*> peer,
Ui::ShowWay way,
MsgId msgId) {
showPeerHistory(peer->id, way, msgId);
MsgId msgId,
anim::type animated,
anim::activation activation) {
showPeerHistory(
peer->id,
way,
msgId,
animated,
activation);
}
void Controller::showPeerHistory(
not_null<History*> history,
Ui::ShowWay way,
MsgId msgId) {
showPeerHistory(history->peer->id, way, msgId);
MsgId msgId,
anim::type animated,
anim::activation activation) {
showPeerHistory(
history->peer->id,
way,
msgId,
animated,
activation);
}
void Controller::showPeerInfo(
PeerId peerId,
anim::type animated) {
anim::type animated,
anim::activation activation) {
if (Adaptive::ThreeColumn()) {
Auth().data().setThirdSectionInfoEnabled(true);
Auth().saveDataDelayed(kThirdSectionInfoTimeoutMs);
}
showSection(Info::Memento(peerId), animated);
showSection(
Info::Memento(peerId),
animated,
activation);
}
void Controller::showPeerInfo(
not_null<PeerData*> peer,
anim::type animated) {
showPeerInfo(peer->id, animated);
anim::type animated,
anim::activation activation) {
showPeerInfo(peer->id, animated, activation);
}
void Controller::showPeerInfo(
not_null<History*> history,
anim::type animated) {
showPeerInfo(history->peer->id, animated);
anim::type animated,
anim::activation activation) {
showPeerInfo(history->peer->id, animated, activation);
}
void Controller::showSection(
SectionMemento &&memento,
anim::type animated) {
App::main()->showSection(std::move(memento), animated);
anim::type animated,
anim::activation activation) {
App::main()->showSection(
std::move(memento),
animated,
activation);
}
void Controller::showBackFromStack() {
chats()->showBackFromStack();
void Controller::showBackFromStack(
anim::type animated,
anim::activation activation) {
chats()->showBackFromStack(animated, activation);
}
void Controller::showSpecialLayer(
object_ptr<LayerWidget> &&layer,
LayerOptions options) {
App::wnd()->showSpecialLayer(std::move(layer), options);
}
void Controller::hideSpecialLayer(LayerOptions options) {
Ui::hideSettingsAndLayer(options & LayerOption::ForceFast);
anim::type animated) {
App::wnd()->showSpecialLayer(std::move(layer), animated);
}
not_null<MainWidget*> Controller::chats() const {