mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various Fixes
This commit is contained in:
@@ -33,8 +33,9 @@ private final class ChannelVisibilityControllerArguments {
|
||||
let shareLink: (ExportedInvitation) -> Void
|
||||
let linkContextAction: (ASDisplayNode, ContextGesture?) -> Void
|
||||
let manageInviteLinks: () -> Void
|
||||
let openLink: (ExportedInvitation) -> Void
|
||||
|
||||
init(context: AccountContext, updateCurrentType: @escaping (CurrentChannelType) -> Void, updatePublicLinkText: @escaping (String?, String) -> Void, scrollToPublicLinkText: @escaping () -> Void, setPeerIdWithRevealedOptions: @escaping (PeerId?, PeerId?) -> Void, revokePeerId: @escaping (PeerId) -> Void, copyLink: @escaping (ExportedInvitation) -> Void, shareLink: @escaping (ExportedInvitation) -> Void, linkContextAction: @escaping (ASDisplayNode, ContextGesture?) -> Void, manageInviteLinks: @escaping () -> Void) {
|
||||
init(context: AccountContext, updateCurrentType: @escaping (CurrentChannelType) -> Void, updatePublicLinkText: @escaping (String?, String) -> Void, scrollToPublicLinkText: @escaping () -> Void, setPeerIdWithRevealedOptions: @escaping (PeerId?, PeerId?) -> Void, revokePeerId: @escaping (PeerId) -> Void, copyLink: @escaping (ExportedInvitation) -> Void, shareLink: @escaping (ExportedInvitation) -> Void, linkContextAction: @escaping (ASDisplayNode, ContextGesture?) -> Void, manageInviteLinks: @escaping () -> Void, openLink: @escaping (ExportedInvitation) -> Void) {
|
||||
self.context = context
|
||||
self.updateCurrentType = updateCurrentType
|
||||
self.updatePublicLinkText = updatePublicLinkText
|
||||
@@ -45,6 +46,7 @@ private final class ChannelVisibilityControllerArguments {
|
||||
self.shareLink = shareLink
|
||||
self.linkContextAction = linkContextAction
|
||||
self.manageInviteLinks = manageInviteLinks
|
||||
self.openLink = openLink
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +304,9 @@ private enum ChannelVisibilityEntry: ItemListNodeEntry {
|
||||
}, contextAction: { node, gesture in
|
||||
arguments.linkContextAction(node, gesture)
|
||||
}, viewAction: {
|
||||
|
||||
if let invite = invite {
|
||||
arguments.openLink(invite)
|
||||
}
|
||||
})
|
||||
case let .editablePublicLink(theme, _, placeholder, currentText):
|
||||
return ItemListSingleLineInputItem(presentationData: presentationData, title: NSAttributedString(string: "t.me/", textColor: theme.list.itemPrimaryTextColor), text: currentText, placeholder: placeholder, type: .regular(capitalization: false, autocorrection: false), clearType: .always, tag: ChannelVisibilityEntryTag.publicLink, sectionId: self.section, textUpdated: { updatedText in
|
||||
@@ -1055,6 +1059,9 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta
|
||||
}, manageInviteLinks: {
|
||||
let controller = inviteLinkListController(context: context, updatedPresentationData: updatedPresentationData, peerId: peerId, admin: nil)
|
||||
pushControllerImpl?(controller)
|
||||
}, openLink: { invite in
|
||||
let controller = InviteLinkViewController(context: context, updatedPresentationData: updatedPresentationData, peerId: peerId, invite: invite, invitationsContext: nil, revokedInvitationsContext: nil, importersContext: nil)
|
||||
pushControllerImpl?(controller)
|
||||
})
|
||||
|
||||
let peerView = context.account.viewTracker.peerView(peerId)
|
||||
|
||||
Reference in New Issue
Block a user