mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-10-27 15:07:24 +00:00
Added ability to open single typed shared media in window for topics.
This commit is contained in:
@@ -1207,8 +1207,18 @@ void SessionNavigation::showByInitialId(
|
||||
: (id.sharedMedia == SeparateSharedMediaType::GIF)
|
||||
? Storage::SharedMediaType::GIF
|
||||
: Storage::SharedMediaType::Photo;
|
||||
const auto topicRootId = id.sharedMediaTopicRootId();
|
||||
const auto peer = id.sharedMediaPeer();
|
||||
const auto topic = topicRootId
|
||||
? peer->forumTopicFor(topicRootId)
|
||||
: nullptr;
|
||||
if (topicRootId && !topic) {
|
||||
break;
|
||||
}
|
||||
showSection(
|
||||
std::make_shared<Info::Memento>(id.sharedMediaPeer(), type),
|
||||
topicRootId
|
||||
? std::make_shared<Info::Memento>(topic, type)
|
||||
: std::make_shared<Info::Memento>(peer, type),
|
||||
instant);
|
||||
parent->widget()->setMaximumWidth(st::maxWidthSharedMediaWindow);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user