Various improvements

This commit is contained in:
Isaac 2024-01-15 21:09:08 +04:00
parent bafcb57627
commit e71bf3beb6
6 changed files with 6 additions and 6 deletions

View File

@ -10937,7 +10937,7 @@ Sorry for the inconvenience.";
"Chat.ReactionContextMenu.RemoveTag" = "Remove Tag";
"Chat.EmptyStateMessagingRestrictedToPremium.Text" = "Subscribe to **Premium**\nto message **%@**.";
"Chat.EmptyStateMessagingRestrictedToPremium.Action" = "Add Premium";
"Chat.EmptyStateMessagingRestrictedToPremium.Action" = "Get Premium";
"Chat.ContextMenuReadDate.ReadAvailablePrefix" = "read";
"Chat.ContextMenuReadDate.ReadAvailableBadge" = "show when";

View File

@ -518,7 +518,7 @@ public func channelMembersController(context: AccountContext, updatedPresentatio
)
|> deliverOnMainQueue).start(next: { chatPeer, exportedInvitation, members in
let disabledIds = members?.compactMap({$0.peer.id}) ?? []
let contactsController = context.sharedContext.makeContactMultiselectionController(ContactMultiselectionControllerParams(context: context, updatedPresentationData: updatedPresentationData, mode: .peerSelection(searchChatList: false, searchGroups: false, searchChannels: false), options: [], filters: [.excludeSelf, .disable(disabledIds)]))
let contactsController = context.sharedContext.makeContactMultiselectionController(ContactMultiselectionControllerParams(context: context, updatedPresentationData: updatedPresentationData, mode: .peerSelection(searchChatList: false, searchGroups: false, searchChannels: false), options: [], filters: [.excludeSelf, .disable(disabledIds)], onlyWriteable: true))
addMembersDisposable.set((
contactsController.result

View File

@ -2266,7 +2266,7 @@ public func channelVisibilityController(context: AccountContext, updatedPresenta
nextImpl = { [weak controller] in
if let controller = controller {
if case .initialSetup = mode {
let selectionController = context.sharedContext.makeContactMultiselectionController(ContactMultiselectionControllerParams(context: context, updatedPresentationData: updatedPresentationData, mode: .channelCreation, options: []))
let selectionController = context.sharedContext.makeContactMultiselectionController(ContactMultiselectionControllerParams(context: context, updatedPresentationData: updatedPresentationData, mode: .channelCreation, options: [], onlyWriteable: true))
(controller.navigationController as? NavigationController)?.replaceAllButRootController(selectionController, animated: true)
let _ = (selectionController.result
|> deliverOnMainQueue).start(next: { [weak selectionController] result in

View File

@ -2959,7 +2959,7 @@ public class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
let context = UIGraphicsGetCurrentContext()!
context.translateBy(x: -self.imageNode.frame.minX, y: -self.imageNode.frame.minY)
self.view.layer.render(in: context)
self.contextSourceNode.contentNode.view.layer.render(in: context)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

View File

@ -2065,7 +2065,7 @@ public class ChatMessageStickerItemNode: ChatMessageItemView {
let context = UIGraphicsGetCurrentContext()!
context.translateBy(x: -self.imageNode.frame.minX, y: -self.imageNode.frame.minY)
self.view.layer.render(in: context)
self.contextSourceNode.contentNode.view.layer.render(in: context)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

View File

@ -11743,7 +11743,7 @@ public func presentAddMembersImpl(context: AccountContext, updatedPresentationDa
}))
contactsController.navigationPresentation = .modal
} else {*/
contactsController = context.sharedContext.makeContactMultiselectionController(ContactMultiselectionControllerParams(context: context, updatedPresentationData: updatedPresentationData, mode: .peerSelection(searchChatList: false, searchGroups: false, searchChannels: false), options: options, filters: [.excludeSelf, .disable(recentIds)]))
contactsController = context.sharedContext.makeContactMultiselectionController(ContactMultiselectionControllerParams(context: context, updatedPresentationData: updatedPresentationData, mode: .peerSelection(searchChatList: false, searchGroups: false, searchChannels: false), options: options, filters: [.excludeSelf, .disable(recentIds)], onlyWriteable: true))
contactsController.navigationPresentation = .modal
//}