Various fixes

This commit is contained in:
Ilya Laktyushin
2021-02-11 22:51:56 +04:00
parent fdbd3ceb7a
commit ad2678645d
40 changed files with 5557 additions and 5839 deletions

View File

@@ -968,8 +968,17 @@ public func channelVisibilityController(context: AccountContext, peerId: PeerId,
return nil
} |> deliverOnMainQueue).start(next: { invite in
if let invite = invite {
let controller = InviteLinkQRCodeController(context: context, invite: invite)
presentControllerImpl?(controller, nil)
let _ = (context.account.postbox.loadedPeerWithId(peerId)
|> deliverOnMainQueue).start(next: { peer in
let isGroup: Bool
if let peer = peer as? TelegramChannel, case .broadcast = peer.info {
isGroup = false
} else {
isGroup = true
}
let controller = InviteLinkQRCodeController(context: context, invite: invite, isGroup: isGroup)
presentControllerImpl?(controller, nil)
})
}
})
})))