mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 23:55:12 +00:00
Fix new window crash for unavailable channels.
This commit is contained in:
@@ -1220,6 +1220,11 @@ void SessionController::closeThirdSection() {
|
||||
}
|
||||
}
|
||||
|
||||
bool SessionController::canShowSeparateWindow(
|
||||
not_null<PeerData*> peer) const {
|
||||
return peer->computeUnavailableReason().isEmpty();
|
||||
}
|
||||
|
||||
void SessionController::showPeer(not_null<PeerData*> peer, MsgId msgId) {
|
||||
const auto currentPeer = activeChatCurrent().peer();
|
||||
if (peer && peer->isChannel() && currentPeer != peer) {
|
||||
|
Reference in New Issue
Block a user