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:
@@ -1803,6 +1803,15 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta
|
||||
|
||||
var footerItem: ItemListControllerFooterItem?
|
||||
|
||||
var isGroup = false
|
||||
if let peer = peer as? TelegramChannel {
|
||||
if case .group = peer.info {
|
||||
isGroup = true
|
||||
}
|
||||
} else if let _ = peer as? TelegramGroup {
|
||||
isGroup = true
|
||||
}
|
||||
|
||||
var rightNavigationButton: ItemListNavigationButton?
|
||||
if case .revokeNames = mode {
|
||||
let count = Int32(publicChannelsToRevoke?.count ?? 0)
|
||||
@@ -1993,7 +2002,13 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta
|
||||
|
||||
_ = (ApplicationSpecificNotice.getSetPublicChannelLink(accountManager: context.sharedContext.accountManager) |> deliverOnMainQueue).start(next: { showAlert in
|
||||
if showAlert {
|
||||
presentControllerImpl?(textAlertController(context: context, updatedPresentationData: updatedPresentationData, title: nil, text: presentationData.strings.Group_Edit_PrivatePublicLinkAlert, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: invokeAction)]), nil)
|
||||
let text: String
|
||||
if isGroup {
|
||||
text = presentationData.strings.Group_Edit_PrivatePublicLinkAlert
|
||||
} else {
|
||||
text = presentationData.strings.Channel_Edit_PrivatePublicLinkAlert
|
||||
}
|
||||
presentControllerImpl?(textAlertController(context: context, updatedPresentationData: updatedPresentationData, title: nil, text: text, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: invokeAction)]), nil)
|
||||
} else {
|
||||
invokeAction()
|
||||
}
|
||||
@@ -2013,16 +2028,7 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta
|
||||
if state.revokingPeerId != nil {
|
||||
rightNavigationButton = ItemListNavigationButton(content: .none, style: .activity, enabled: true, action: {})
|
||||
}
|
||||
|
||||
var isGroup = false
|
||||
if let peer = peer as? TelegramChannel {
|
||||
if case .group = peer.info {
|
||||
isGroup = true
|
||||
}
|
||||
} else if let _ = peer as? TelegramGroup {
|
||||
isGroup = true
|
||||
}
|
||||
|
||||
|
||||
let leftNavigationButton: ItemListNavigationButton?
|
||||
switch mode {
|
||||
case .initialSetup:
|
||||
|
||||
Reference in New Issue
Block a user