2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Show replies dialog correctly.

This commit is contained in:
John Preston
2020-09-11 18:33:26 +03:00
parent 608d8307d9
commit 4a94a0c438
42 changed files with 345 additions and 58 deletions

View File

@@ -154,16 +154,16 @@ void WrapWidget::injectActivePeerProfile(not_null<PeerData*> peer) {
? _historyStack.front().section->section().mediaType()
: _controller->section().mediaType();
}();
const auto expectedType = peer->isSelf()
const auto expectedType = peer->sharedMediaInfo()
? Section::Type::Media
: Section::Type::Profile;
const auto expectedMediaType = peer->isSelf()
const auto expectedMediaType = peer->sharedMediaInfo()
? Section::MediaType::Photo
: Section::MediaType::kCount;
if (firstSectionType != expectedType
|| firstSectionMediaType != expectedMediaType
|| firstPeer != peer) {
auto section = peer->isSelf()
auto section = peer->sharedMediaInfo()
? Section(Section::MediaType::Photo)
: Section(Section::Type::Profile);
injectActiveProfileMemento(std::move(
@@ -481,7 +481,7 @@ void WrapWidget::addProfileCallsButton() {
const auto peer = key().peer();
const auto user = peer ? peer->asUser() : nullptr;
if (!user
|| user->isSelf()
|| user->sharedMediaInfo()
|| !user->session().serverConfig().phoneCallsEnabled.current()) {
return;
}