diff --git a/submodules/AsyncDisplayKit/Source/ASDisplayNode+Layout.mm b/submodules/AsyncDisplayKit/Source/ASDisplayNode+Layout.mm index e4fad6d308..769dd634fc 100644 --- a/submodules/AsyncDisplayKit/Source/ASDisplayNode+Layout.mm +++ b/submodules/AsyncDisplayKit/Source/ASDisplayNode+Layout.mm @@ -911,7 +911,7 @@ ASLayoutElementStyleExtensibilityForwarding NSArray *sublayouts = _calculatedDisplayNodeLayout.layout.sublayouts; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 180400 #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #endif @@ -938,7 +938,7 @@ ASLayoutElementStyleExtensibilityForwarding #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 180400 #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #endif diff --git a/submodules/AsyncDisplayKit/Source/ASExperimentalFeatures.mm b/submodules/AsyncDisplayKit/Source/ASExperimentalFeatures.mm index 3902f8853b..9787bc62ce 100644 --- a/submodules/AsyncDisplayKit/Source/ASExperimentalFeatures.mm +++ b/submodules/AsyncDisplayKit/Source/ASExperimentalFeatures.mm @@ -34,7 +34,7 @@ NSArray *ASExperimentalFeaturesGetNames(ASExperimentalFeatures flags #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 180400 #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #endif diff --git a/submodules/AsyncDisplayKit/Source/ASInternalHelpers.mm b/submodules/AsyncDisplayKit/Source/ASInternalHelpers.mm index 2788e98a85..35be7039ad 100644 --- a/submodules/AsyncDisplayKit/Source/ASInternalHelpers.mm +++ b/submodules/AsyncDisplayKit/Source/ASInternalHelpers.mm @@ -142,7 +142,7 @@ Class _Nullable ASGetClassFromType(const char * _Nullable type) size_t resultLength = typeLength - 3; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 180400 #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #endif diff --git a/submodules/AsyncDisplayKit/Source/ASLayout.mm b/submodules/AsyncDisplayKit/Source/ASLayout.mm index 828f678156..48481c4e60 100644 --- a/submodules/AsyncDisplayKit/Source/ASLayout.mm +++ b/submodules/AsyncDisplayKit/Source/ASLayout.mm @@ -237,7 +237,7 @@ static std::atomic_bool static_retainsSublayoutLayoutElements = ATOMIC_VAR_INIT( // Fast-reverse-enumerate the sublayouts array by copying it into a C-array and push_front'ing each into the queue. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 180400 #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #endif diff --git a/submodules/AsyncDisplayKit/Source/ASLayoutSpec.mm b/submodules/AsyncDisplayKit/Source/ASLayoutSpec.mm index 797f2c8d82..1c99408f2e 100644 --- a/submodules/AsyncDisplayKit/Source/ASLayoutSpec.mm +++ b/submodules/AsyncDisplayKit/Source/ASLayoutSpec.mm @@ -161,7 +161,7 @@ ASLayoutElementStyleExtensibilityForwarding // Use tiny descriptions because these trees can get nested very deep. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 180400 #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #endif @@ -301,7 +301,7 @@ ASSynthesizeLockingMethodsWithMutex(__instanceLock__) const auto count = children.count; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 180400 #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #endif diff --git a/submodules/AsyncDisplayKit/Source/ASMainThreadDeallocation.mm b/submodules/AsyncDisplayKit/Source/ASMainThreadDeallocation.mm index 35818550a0..e338a975de 100644 --- a/submodules/AsyncDisplayKit/Source/ASMainThreadDeallocation.mm +++ b/submodules/AsyncDisplayKit/Source/ASMainThreadDeallocation.mm @@ -34,7 +34,7 @@ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 180400 #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #endif diff --git a/submodules/ChatListUI/Sources/ChatListController.swift b/submodules/ChatListUI/Sources/ChatListController.swift index 36f25182b6..c7434be7e4 100644 --- a/submodules/ChatListUI/Sources/ChatListController.swift +++ b/submodules/ChatListUI/Sources/ChatListController.swift @@ -1177,9 +1177,10 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController ApplicationSpecificNotice.displayChatListArchiveTooltip(accountManager: self.context.sharedContext.accountManager), self.context.engine.data.get( TelegramEngine.EngineData.Item.Configuration.GlobalPrivacy() - ) + ), + self.context.engine.messages.chatList(group: .archive, count: 20) |> take(1) ) - |> deliverOnMainQueue).startStandalone(next: { [weak self] didDisplayTip, settings in + |> deliverOnMainQueue).startStandalone(next: { [weak self] didDisplayTip, settings, chatListHead in guard let self else { return } @@ -1192,7 +1193,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController navigationController.pushViewController(chatListController) } - if !didDisplayTip { + if !didDisplayTip, chatListHead.items.count < 10 { #if DEBUG #else let _ = ApplicationSpecificNotice.setDisplayChatListArchiveTooltip(accountManager: self.context.sharedContext.accountManager).startStandalone() diff --git a/submodules/ContactListUI/Sources/ContactListNode.swift b/submodules/ContactListUI/Sources/ContactListNode.swift index 569cb412d7..67b130f2a0 100644 --- a/submodules/ContactListUI/Sources/ContactListNode.swift +++ b/submodules/ContactListUI/Sources/ContactListNode.swift @@ -201,8 +201,8 @@ private enum ContactListNodeEntry: Comparable, Identifiable { status = .none itemPeer = .deviceContact(stableId: id, contact: contact) } - if isSearch { - status = .none + if isSearch, case let .peer(peer, _) = itemPeer, let _ = peer?.addressName { + status = .addressName("") } var itemContextAction: ((ASDisplayNode, ContextGesture?, CGPoint?) -> Void)? if isContextActionEnabled, let contextAction = interaction.contextAction { diff --git a/submodules/LegacyComponents/Sources/ActionStage.mm b/submodules/LegacyComponents/Sources/ActionStage.mm index 0d55828276..3904249b9b 100644 --- a/submodules/LegacyComponents/Sources/ActionStage.mm +++ b/submodules/LegacyComponents/Sources/ActionStage.mm @@ -246,7 +246,7 @@ ActionStage *ActionStageInstance() int length = (int)path.length; #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif unichar newPath[path.length]; diff --git a/submodules/LegacyComponents/Sources/Freedom.mm b/submodules/LegacyComponents/Sources/Freedom.mm index 38436e31e9..f0828b4ce4 100644 --- a/submodules/LegacyComponents/Sources/Freedom.mm +++ b/submodules/LegacyComponents/Sources/Freedom.mm @@ -258,7 +258,7 @@ static bool consumeField(const char *desc, int length, int &offset, uint32_t &ou outName = (uint32_t)murMurHashBytes32((void *)(desc + offset), i - offset); #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif char buf[i - offset + 1]; diff --git a/submodules/LegacyComponents/Sources/POPDecayAnimationInternal.h b/submodules/LegacyComponents/Sources/POPDecayAnimationInternal.h index fa822bb748..d138d3f448 100644 --- a/submodules/LegacyComponents/Sources/POPDecayAnimationInternal.h +++ b/submodules/LegacyComponents/Sources/POPDecayAnimationInternal.h @@ -27,7 +27,7 @@ static void decay_position(CGFloat *x, CGFloat *v, NSUInteger count, CFTimeInter // x0 = x; // x = x0 + v0 * deceleration * (1 - powf(deceleration, dt)) / (1 - deceleration) #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif float v0[count]; diff --git a/submodules/LegacyComponents/Sources/TGStringUtils.mm b/submodules/LegacyComponents/Sources/TGStringUtils.mm index 52208738fb..6c903dd263 100644 --- a/submodules/LegacyComponents/Sources/TGStringUtils.mm +++ b/submodules/LegacyComponents/Sources/TGStringUtils.mm @@ -1140,7 +1140,7 @@ int32_t phoneMatchHash(NSString *phone) { int length = (int)phone.length; #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif char cleanString[length]; diff --git a/submodules/MtProtoKit/Sources/MTGzip.m b/submodules/MtProtoKit/Sources/MTGzip.m index a131b25d61..53e0f8af1f 100644 --- a/submodules/MtProtoKit/Sources/MTGzip.m +++ b/submodules/MtProtoKit/Sources/MTGzip.m @@ -11,7 +11,7 @@ int windowBits = 15 + 32; //Default + gzip header instead of zlib header int retCode; #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #pragma clang diagnostic ignored "-Wgnu-folding-constant" diff --git a/submodules/MtProtoKit/Sources/MTInternalMessageParser.m b/submodules/MtProtoKit/Sources/MTInternalMessageParser.m index 9137814a02..99ba8646cf 100644 --- a/submodules/MtProtoKit/Sources/MTInternalMessageParser.m +++ b/submodules/MtProtoKit/Sources/MTInternalMessageParser.m @@ -689,7 +689,7 @@ int windowBits = 15 + 32; //Default + gzip header instead of zlib header int retCode; #pragma clang diagnostic push -#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000 +#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180500 #pragma clang diagnostic ignored "-Wvla-cxx-extension" #endif #pragma clang diagnostic ignored "-Wgnu-folding-constant" diff --git a/submodules/Postbox/Sources/ChatListView.swift b/submodules/Postbox/Sources/ChatListView.swift index 2a3d47aca1..b98ec21e41 100644 --- a/submodules/Postbox/Sources/ChatListView.swift +++ b/submodules/Postbox/Sources/ChatListView.swift @@ -1061,6 +1061,7 @@ public final class ChatListView { extractedCachedData: entryData.extractedCachedData ))) case let .HoleEntry(hole): + entries.removeAll() entries.append(.HoleEntry(hole)) case .IntermediateMessageEntry: assertionFailure() diff --git a/submodules/TelegramUI/Components/Chat/ChatMessageBubbleItemNode/Sources/ChatMessageBubbleItemNode.swift b/submodules/TelegramUI/Components/Chat/ChatMessageBubbleItemNode/Sources/ChatMessageBubbleItemNode.swift index 23ad6ae540..ad4a5f9a3d 100644 --- a/submodules/TelegramUI/Components/Chat/ChatMessageBubbleItemNode/Sources/ChatMessageBubbleItemNode.swift +++ b/submodules/TelegramUI/Components/Chat/ChatMessageBubbleItemNode/Sources/ChatMessageBubbleItemNode.swift @@ -2670,7 +2670,7 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI }*/ var hasReply = replyMessage != nil || replyForward != nil || replyStory != nil - if !isInstantVideo, hasThreadInfo { + if !isInstantVideo && hasThreadInfo { if let threadId = item.message.threadId, let replyMessage = replyMessage, Int64(replyMessage.id.id) == threadId { hasReply = false } @@ -2701,6 +2701,9 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI headerSize.height += threadInfoSizeApply.0.height + 5.0 }*/ } + if !isInstantVideo, hasReply, let threadId = item.message.threadId, let replyMessage, replyQuote == nil, case let .replyThread(replyThread) = item.chatLocation, replyThread.isChannelPost, replyMessage.id.id == Int32(clamping: threadId) { + hasReply = false + } if !isInstantVideo, hasReply, (replyMessage != nil || replyForward != nil || replyStory != nil) { if headerSize.height.isZero { diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift index ce470d6b7b..f87af616b9 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNode.swift @@ -2090,7 +2090,7 @@ final class PeerInfoHeaderNode: ASDisplayNode { let subtitleBadgeFrame: CGRect subtitleBadgeFrame = CGRect(origin: CGPoint(x: (-subtitleSize.width) * 0.5 - subtitleRatingSize.width + 1.0, y: subtitleOffset + floor((-subtitleRatingSize.height) * 0.5)), size: subtitleRatingSize) transition.updateFrameAdditive(view: subtitleRatingView, frame: subtitleBadgeFrame) - transition.updateAlpha(layer: subtitleRatingView.layer, alpha: subtitleAlpha) + transition.updateAlpha(layer: subtitleRatingView.layer, alpha: subtitleAlpha * (1.0 - transitionFraction)) } } else { let titleScale: CGFloat diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoStoryGridScreen/Sources/PeerInfoStoryGridScreen.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoStoryGridScreen/Sources/PeerInfoStoryGridScreen.swift index 44ce59bb97..ac6dc07ef7 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoStoryGridScreen/Sources/PeerInfoStoryGridScreen.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoStoryGridScreen/Sources/PeerInfoStoryGridScreen.swift @@ -385,7 +385,7 @@ final class PeerInfoStoryGridScreenComponent: Component { } if let selectionModeCompletion = component.selectionModeCompletion { - selectionModeCompletion(Array(paneNode.selectedItems.values)) + selectionModeCompletion(Array(paneNode.selectedItems.sorted(by: { $0.key < $1.key }).map(\.value))) environment.controller()?.dismiss() return } diff --git a/submodules/TelegramUI/Components/SendInviteLinkScreen/Sources/SendInviteLinkScreen.swift b/submodules/TelegramUI/Components/SendInviteLinkScreen/Sources/SendInviteLinkScreen.swift index 3db8d0b7bc..04691de605 100644 --- a/submodules/TelegramUI/Components/SendInviteLinkScreen/Sources/SendInviteLinkScreen.swift +++ b/submodules/TelegramUI/Components/SendInviteLinkScreen/Sources/SendInviteLinkScreen.swift @@ -1028,7 +1028,18 @@ private final class SendInviteLinkScreenComponent: Component { let presentationData = component.context.sharedContext.currentPresentationData.with { $0 } controller.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: false, text: text), elevatedLayout: false, action: { _ in return false }), in: .window(.root)) - controller.dismiss() + let navigationController = controller.navigationController as? NavigationController + + let context = component.context + controller.dismiss(completion: { [weak navigationController] in + if let navigationController, let peer = selectedPeers.first?.peer { + context.sharedContext.navigateToChatController(NavigateToChatControllerParams( + navigationController: navigationController, + context: context, + chatLocation: .peer(peer) + )) + } + }) } ) } diff --git a/submodules/TelegramUI/Sources/NotificationContainerControllerNode.swift b/submodules/TelegramUI/Sources/NotificationContainerControllerNode.swift index 5870ae8426..4d055b9b80 100644 --- a/submodules/TelegramUI/Sources/NotificationContainerControllerNode.swift +++ b/submodules/TelegramUI/Sources/NotificationContainerControllerNode.swift @@ -51,6 +51,9 @@ final class NotificationContainerControllerNode: ASDisplayNode { } override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { + if self.alpha == 0.0 { + return nil + } if let (_, blockingItemNode) = self.blockingItemAndNode { return blockingItemNode.hitTest(point, with: event) }