2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Start new Info section (profile + shared media).

This commit is contained in:
John Preston
2017-09-13 20:01:23 +03:00
parent fbcd5e2f1e
commit 088d23d557
80 changed files with 3969 additions and 63 deletions

View File

@@ -21,6 +21,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "facades.h"
#include "profile/profile_section_memento.h"
#include "info/info_memento.h"
#include "core/click_handler_types.h"
#include "media/media_clip_reader.h"
#include "observer_peer.h"
@@ -256,8 +257,17 @@ void autoplayMediaInlineAsync(const FullMsgId &msgId) {
}
void showPeerProfile(const PeerId &peer) {
if (auto main = App::main()) {
main->showWideSection(Profile::SectionMemento(App::peer(peer)));
//if (auto main = App::main()) {
// main->showWideSection(Profile::SectionMemento(App::peer(peer)));
//}
if (auto window = App::wnd()) {
auto memento = Info::Memento(peer);
if (auto layer = memento.createLayer(window->controller())) {
window->showSpecialLayer(std::move(layer));
} else {
App::main()->showWideSection(std::move(memento));
}
}
}