Disable client-side verified peer info editing alerts

This commit is contained in:
Ali 2020-03-25 23:48:10 +04:00
parent 0502cef37d
commit 0770357c70
5 changed files with 3718 additions and 3747 deletions

View File

@ -5468,11 +5468,6 @@ Any member of this group will be able to see messages in the channel.";
"ChatListFilter.ShowMoreChats_many" = "Show %@ More Chats";
"ChatListFilter.ShowMoreChats_any" = "Show %@ More Chats";
"SetupUsername.ChangeNameWarningChannel" = "Warning, if you change the name of your channel, it will loose its verified status. You will need to send a new application to @verification_bot";
"SetupUsername.ChangeNameWarningGroup" = "Warning, if you change the name of your group, it will loose its verified status. You will need to send a new application to @verification_bot";
"SetupUsername.ChangeLinkWarningChannel" = "Warning, if you change the short link to your channel, it will loose its verified status. You will need to send a new application to @verification_bot";
"SetupUsername.ChangeLinkWarningGroup" = "Warning, if you change the short link to your group, it will loose its verified status. You will need to send a new application to @verification_bot";
"MuteFor.Forever" = "Mute Forever";
"Conversation.Dice" = "Send a 🎲 emoji to any chat to get a random number from Telegram.";

View File

@ -1051,23 +1051,13 @@ public func channelVisibilityController(context: AccountContext, peerId: PeerId,
}
if peer.isVerified {
let alertText: String
if case .broadcast = peer.info {
alertText = presentationData.strings.SetupUsername_ChangeLinkWarningChannel
_ = (ApplicationSpecificNotice.getSetPublicChannelLink(accountManager: context.sharedContext.accountManager) |> deliverOnMainQueue).start(next: { showAlert in
if showAlert {
presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.Channel_Edit_PrivatePublicLinkAlert, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: invokeAction)]), nil)
} else {
alertText = presentationData.strings.SetupUsername_ChangeLinkWarningGroup
invokeAction()
}
presentControllerImpl?(textAlertController(context: context, title: nil, text: alertText, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: invokeAction)]), nil)
} else {
_ = (ApplicationSpecificNotice.getSetPublicChannelLink(accountManager: context.sharedContext.accountManager) |> deliverOnMainQueue).start(next: { showAlert in
if showAlert {
presentControllerImpl?(textAlertController(context: context, title: nil, text: presentationData.strings.Channel_Edit_PrivatePublicLinkAlert, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: invokeAction)]), nil)
} else {
invokeAction()
}
})
}
})
} else {
switch mode {
case .initialSetup:

View File

@ -1889,17 +1889,7 @@ private final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewD
}
}
if channel.isVerified && title != channel.title {
let alertText: String
if case .broadcast = channel.info {
alertText = strongSelf.presentationData.strings.SetupUsername_ChangeNameWarningChannel
} else {
alertText = strongSelf.presentationData.strings.SetupUsername_ChangeNameWarningGroup
}
strongSelf.controller?.present(textAlertController(context: context, title: nil, text: alertText, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .genericAction, title: strongSelf.presentationData.strings.Common_OK, action: proceed)]), in: .window(.root))
} else {
proceed()
}
proceed()
} else {
strongSelf.headerNode.navigationButtonContainer.performAction?(.cancel)
}