diff --git a/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift b/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift index 95ba00a378..7e9b5bf567 100644 --- a/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift +++ b/submodules/ChatListUI/Sources/ChatListSearchContainerNode.swift @@ -769,7 +769,7 @@ public final class ChatListSearchContainerNode: SearchDisplayControllerContentNo messageTags = .photo } else if query.hasPrefix("%video ") { messageTags = .video - } else if query.hasPrefix("%file ") { + } else if query.hasPrefix("%file ") { messageTags = .file } else if query.hasPrefix("%music ") { messageTags = .music diff --git a/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift b/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift index 4bcc2091d9..baa26a72cf 100644 --- a/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift +++ b/submodules/GalleryUI/Sources/ChatVideoGalleryItemScrubberView.swift @@ -128,10 +128,14 @@ final class ChatVideoGalleryItemScrubberView: UIView { self.collapsed = collapsed + guard let (size, _, _) = self.containerLayout else { + return + } + let alpha: CGFloat = collapsed ? 0.0 : 1.0 self.leftTimestampNode.alpha = alpha self.rightTimestampNode.alpha = alpha - self.infoNode.alpha = alpha + self.infoNode.alpha = size.width < size.height && !self.collapsed ? 1.0 : 0.0 self.updateScrubberVisibility(animated: animated) } @@ -161,7 +165,7 @@ final class ChatVideoGalleryItemScrubberView: UIView { self.leftTimestampNode.status = mappedStatus self.rightTimestampNode.status = mappedStatus - if let mappedStatus = mappedStatus { + if let mappedStatus = mappedStatus, false { self.chapterDisposable.set((mappedStatus |> deliverOnMainQueue).start(next: { [weak self] status in if let strongSelf = self, status.duration > 1.0 { diff --git a/submodules/ShareController/Sources/ShareController.swift b/submodules/ShareController/Sources/ShareController.swift index 907362c78b..78e8de6d3f 100644 --- a/submodules/ShareController/Sources/ShareController.swift +++ b/submodules/ShareController/Sources/ShareController.swift @@ -593,25 +593,25 @@ public final class ShareController: ViewController { } self.controllerNode.shareExternal = { [weak self] in if let strongSelf = self { - if case let .messages(messages) = strongSelf.subject, let message = messages.first, let peer = message.peers[message.id.peerId] { - let renderer = MessageStoryRenderer(context: strongSelf.currentContext, messages: messages) - - let layout = ContainerViewLayout(size: CGSize(width: 414.0, height: 896.0), metrics: LayoutMetrics(widthClass: .compact, heightClass: .compact), deviceMetrics: .iPhoneX, intrinsicInsets: UIEdgeInsets(), safeInsets: UIEdgeInsets(), statusBarHeight: 0.0, inputHeight: nil, inputHeightIsInteractivellyChanging: false, inVoiceOver: false) - renderer.update(layout: layout) { image in - if let data = image?.pngData() { - let pasteboardItems: [[String: Any]] = [["com.instagram.sharedSticker.backgroundImage": data, - "com.instagram.sharedSticker.contentURL": "https://t.me/\(peer.addressName ?? "")/\(message.id.id)"]] - if #available(iOS 10.0, *) { - UIPasteboard.general.setItems(pasteboardItems, options: [.expirationDate: Date().addingTimeInterval(5 * 60)]) - } else { -// UIPasteboard.general.setItems(pasteboardItems) - } - strongSelf.sharedContext.applicationBindings.openUrl("instagram-stories://share") - } - } - - return .complete() - } +// if case let .messages(messages) = strongSelf.subject, let message = messages.first, let peer = message.peers[message.id.peerId] { +// let renderer = MessageStoryRenderer(context: strongSelf.currentContext, messages: messages) +// +// let layout = ContainerViewLayout(size: CGSize(width: 414.0, height: 896.0), metrics: LayoutMetrics(widthClass: .compact, heightClass: .compact), deviceMetrics: .iPhoneX, intrinsicInsets: UIEdgeInsets(), safeInsets: UIEdgeInsets(), statusBarHeight: 0.0, inputHeight: nil, inputHeightIsInteractivellyChanging: false, inVoiceOver: false) +// renderer.update(layout: layout) { image in +// if let data = image?.pngData() { +// let pasteboardItems: [[String: Any]] = [["com.instagram.sharedSticker.backgroundImage": data, +// "com.instagram.sharedSticker.contentURL": "https://t.me/\(peer.addressName ?? "")/\(message.id.id)"]] +// if #available(iOS 10.0, *) { +// UIPasteboard.general.setItems(pasteboardItems, options: [.expirationDate: Date().addingTimeInterval(5 * 60)]) +// } else { +//// UIPasteboard.general.setItems(pasteboardItems) +// } +// strongSelf.sharedContext.applicationBindings.openUrl("instagram-stories://share") +// } +// } +// +// return .complete() +// } var collectableItems: [CollectableExternalShareItem] = [] diff --git a/submodules/TelegramCallsUI/Sources/CallControllerToastNode.swift b/submodules/TelegramCallsUI/Sources/CallControllerToastNode.swift index 3fd4376d5b..b8a472ddcd 100644 --- a/submodules/TelegramCallsUI/Sources/CallControllerToastNode.swift +++ b/submodules/TelegramCallsUI/Sources/CallControllerToastNode.swift @@ -300,15 +300,12 @@ private class CallControllerToastItemNode: ASDisplayNode { let initialFrame = CGRect(x: floor((self.frame.width - 44.0) / 2.0), y: 0.0, width: 44.0, height: 28.0) self.clipNode.frame = initialFrame -// self.effectView.frame = CGRect(origin: CGPoint(), size: initialFrame.size) self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2) - self.layer.animateSpring(from: 0.01 as NSNumber, to: 1.0 as NSNumber, keyPath: "transform.scale", duration: 0.45, damping: 105.0, completion: { _ in + self.layer.animateSpring(from: 0.01 as NSNumber, to: 1.0 as NSNumber, keyPath: "transform.scale", duration: 0.3, damping: 105.0, completion: { _ in self.clipNode.frame = targetFrame -// self.effectView.frame = CGRect(origin: CGPoint(), size: targetFrame.size) self.clipNode.layer.animateFrame(from: initialFrame, to: targetFrame, duration: 0.35, timingFunction: kCAMediaTimingFunctionSpring) -// self.effectView.layer.animateFrame(from: initialFrame, to: targetFrame, duration: 0.35, timingFunction: kCAMediaTimingFunctionSpring) }) }