mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
Fix build
This commit is contained in:
parent
985bf53ad7
commit
58fa061fa2
@ -4162,7 +4162,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
let peerName = EnginePeer(peer).displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)
|
let peerName = EnginePeer(peer).displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)
|
||||||
let text: String
|
let text: String
|
||||||
if case .user = peerType {
|
if case .user = peerType {
|
||||||
text = strongSelf.presentationData.strings.RequestPeer_SelectionConfirmationText(peerName, botName).string
|
text = strongSelf.presentationData.strings.RequestPeer_SelectionConfirmationTitle(peerName, botName).string
|
||||||
} else {
|
} else {
|
||||||
var botAdminRights: TelegramChatAdminRights?
|
var botAdminRights: TelegramChatAdminRights?
|
||||||
switch peerType {
|
switch peerType {
|
||||||
@ -4174,9 +4174,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
if let botAdminRights {
|
if let botAdminRights {
|
||||||
text = strongSelf.presentationData.strings.RequestPeer_SelectionConfirmationInviteWithRightsText(peerName, botName, botName, peerName, stringForAdminRights(strings: strongSelf.presentationData.strings, adminRights: botAdminRights)).string
|
text = strongSelf.presentationData.strings.RequestPeer_SelectionConfirmationInviteWithRightsText(botName, peerName, stringForAdminRights(strings: strongSelf.presentationData.strings, adminRights: botAdminRights)).string
|
||||||
} else {
|
} else {
|
||||||
text = strongSelf.presentationData.strings.RequestPeer_SelectionConfirmationInviteText(peerName, botName, botName, peerName).string
|
text = strongSelf.presentationData.strings.RequestPeer_SelectionConfirmationInviteText(botName, peerName).string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1210,11 +1210,13 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate {
|
|||||||
self.attachmentButtonDisabledNode.isHidden = !isSlowmodeActive || isMediaEnabled
|
self.attachmentButtonDisabledNode.isHidden = !isSlowmodeActive || isMediaEnabled
|
||||||
|
|
||||||
var sendingTextDisabled = false
|
var sendingTextDisabled = false
|
||||||
if let peer = interfaceState.renderedPeer?.peer {
|
if interfaceState.interfaceState.editMessage == nil {
|
||||||
if let channel = peer as? TelegramChannel, channel.hasBannedPermission(.banSendText) != nil {
|
if let peer = interfaceState.renderedPeer?.peer {
|
||||||
sendingTextDisabled = true
|
if let channel = peer as? TelegramChannel, channel.hasBannedPermission(.banSendText) != nil {
|
||||||
} else if let group = peer as? TelegramGroup, group.hasBannedPermission(.banSendText) {
|
sendingTextDisabled = true
|
||||||
sendingTextDisabled = true
|
} else if let group = peer as? TelegramGroup, group.hasBannedPermission(.banSendText) {
|
||||||
|
sendingTextDisabled = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.sendingTextDisabled = sendingTextDisabled
|
self.sendingTextDisabled = sendingTextDisabled
|
||||||
@ -1366,7 +1368,7 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate {
|
|||||||
let dismissedButtonMessageUpdated = interfaceState.interfaceState.messageActionsState.dismissedButtonKeyboardMessageId != previousState?.interfaceState.messageActionsState.dismissedButtonKeyboardMessageId
|
let dismissedButtonMessageUpdated = interfaceState.interfaceState.messageActionsState.dismissedButtonKeyboardMessageId != previousState?.interfaceState.messageActionsState.dismissedButtonKeyboardMessageId
|
||||||
let replyMessageUpdated = interfaceState.interfaceState.replyMessageId != previousState?.interfaceState.replyMessageId
|
let replyMessageUpdated = interfaceState.interfaceState.replyMessageId != previousState?.interfaceState.replyMessageId
|
||||||
|
|
||||||
if let peer = interfaceState.renderedPeer?.peer, previousState?.renderedPeer?.peer == nil || !peer.isEqual(previousState!.renderedPeer!.peer!) || previousState?.interfaceState.silentPosting != interfaceState.interfaceState.silentPosting || themeUpdated || !self.initializedPlaceholder || previousState?.keyboardButtonsMessage?.id != interfaceState.keyboardButtonsMessage?.id || previousState?.keyboardButtonsMessage?.visibleReplyMarkupPlaceholder != interfaceState.keyboardButtonsMessage?.visibleReplyMarkupPlaceholder || dismissedButtonMessageUpdated || replyMessageUpdated {
|
if let peer = interfaceState.renderedPeer?.peer, previousState?.renderedPeer?.peer == nil || !peer.isEqual(previousState!.renderedPeer!.peer!) || previousState?.interfaceState.silentPosting != interfaceState.interfaceState.silentPosting || themeUpdated || !self.initializedPlaceholder || previousState?.keyboardButtonsMessage?.id != interfaceState.keyboardButtonsMessage?.id || previousState?.keyboardButtonsMessage?.visibleReplyMarkupPlaceholder != interfaceState.keyboardButtonsMessage?.visibleReplyMarkupPlaceholder || dismissedButtonMessageUpdated || replyMessageUpdated || (previousState?.interfaceState.editMessage == nil) != (interfaceState.interfaceState.editMessage == nil) {
|
||||||
self.initializedPlaceholder = true
|
self.initializedPlaceholder = true
|
||||||
|
|
||||||
var placeholder: String
|
var placeholder: String
|
||||||
|
|||||||
@ -6824,11 +6824,11 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
let signal: Signal<UpdatePeerPhotoStatus, UploadPeerPhotoError>
|
let signal: Signal<UpdatePeerPhotoStatus, UploadPeerPhotoError>
|
||||||
if self.isSettings {
|
if self.isSettings {
|
||||||
if case .fallback = mode {
|
if case .fallback = mode {
|
||||||
signal = self.context.engine.accountData.updateFallbackPhoto(resource: resource, videoResource: nil, videoStartTimestamp: nil, mapResourceToAvatarSizes: { resource, representations in
|
signal = self.context.engine.accountData.updateFallbackPhoto(resource: resource, videoResource: nil, videoStartTimestamp: nil, fileId: nil, backgroundColors: nil, mapResourceToAvatarSizes: { resource, representations in
|
||||||
return mapResourceToAvatarSizes(postbox: postbox, resource: resource, representations: representations)
|
return mapResourceToAvatarSizes(postbox: postbox, resource: resource, representations: representations)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
signal = self.context.engine.accountData.updateAccountPhoto(resource: resource, videoResource: nil, videoStartTimestamp: nil, mapResourceToAvatarSizes: { resource, representations in
|
signal = self.context.engine.accountData.updateAccountPhoto(resource: resource, videoResource: nil, videoStartTimestamp: nil, fileId: nil, backgroundColors: nil, mapResourceToAvatarSizes: { resource, representations in
|
||||||
return mapResourceToAvatarSizes(postbox: postbox, resource: resource, representations: representations)
|
return mapResourceToAvatarSizes(postbox: postbox, resource: resource, representations: representations)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -7049,11 +7049,11 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
|> mapToSignal { videoResource -> Signal<UpdatePeerPhotoStatus, UploadPeerPhotoError> in
|
|> mapToSignal { videoResource -> Signal<UpdatePeerPhotoStatus, UploadPeerPhotoError> in
|
||||||
if isSettings {
|
if isSettings {
|
||||||
if case .fallback = mode {
|
if case .fallback = mode {
|
||||||
return context.engine.accountData.updateFallbackPhoto(resource: photoResource, videoResource: videoResource, videoStartTimestamp: videoStartTimestamp, mapResourceToAvatarSizes: { resource, representations in
|
return context.engine.accountData.updateFallbackPhoto(resource: photoResource, videoResource: videoResource, videoStartTimestamp: videoStartTimestamp, fileId: nil, backgroundColors: nil, mapResourceToAvatarSizes: { resource, representations in
|
||||||
return mapResourceToAvatarSizes(postbox: account.postbox, resource: resource, representations: representations)
|
return mapResourceToAvatarSizes(postbox: account.postbox, resource: resource, representations: representations)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return context.engine.accountData.updateAccountPhoto(resource: photoResource, videoResource: videoResource, videoStartTimestamp: videoStartTimestamp, mapResourceToAvatarSizes: { resource, representations in
|
return context.engine.accountData.updateAccountPhoto(resource: photoResource, videoResource: videoResource, videoStartTimestamp: videoStartTimestamp, fileId: nil, backgroundColors: nil, mapResourceToAvatarSizes: { resource, representations in
|
||||||
return mapResourceToAvatarSizes(postbox: account.postbox, resource: resource, representations: representations)
|
return mapResourceToAvatarSizes(postbox: account.postbox, resource: resource, representations: representations)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -7221,7 +7221,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let controller = AvatarEditorScreen(context: strongSelf.context)
|
let controller = AvatarEditorScreen(context: strongSelf.context, initialFileId: nil, initialBackgroundColors: nil)
|
||||||
controller.completion = completion
|
controller.completion = completion
|
||||||
(strongSelf.controller?.navigationController?.topViewController as? ViewController)?.push(controller)
|
(strongSelf.controller?.navigationController?.topViewController as? ViewController)?.push(controller)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user