Merge commit '7621e2f8dec938cf48181c8b10afc9b01f444e68' into beta

This commit is contained in:
Ilya Laktyushin
2025-12-06 02:17:48 +04:00
commit 8344b97e03
28070 changed files with 7995182 additions and 0 deletions
@@ -0,0 +1,19 @@
//
// ProgressNavigationButtonNode.h
// ProgressNavigationButtonNode
//
// Created by Peter on 8/1/19.
// Copyright © 2019 Telegram Messenger LLP. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for ProgressNavigationButtonNode.
FOUNDATION_EXPORT double ProgressNavigationButtonNodeVersionNumber;
//! Project version string for ProgressNavigationButtonNode.
FOUNDATION_EXPORT const unsigned char ProgressNavigationButtonNodeVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <ProgressNavigationButtonNode/PublicHeader.h>
@@ -0,0 +1,30 @@
import Foundation
import UIKit
import AsyncDisplayKit
import Display
import ActivityIndicator
public final class ProgressNavigationButtonNode: ASDisplayNode {
private var indicatorNode: ActivityIndicator
public init(color: UIColor) {
self.indicatorNode = ActivityIndicator(type: .custom(color, 22.0, 1.0, false))
super.init()
self.addSubnode(self.indicatorNode)
}
override public func calculateSizeThatFits(_ constrainedSize: CGSize) -> CGSize {
return CGSize(width: 26.0, height: 22.0)
}
override public func layout() {
super.layout()
let size = self.bounds.size
let indicatorSize = CGSize(width: 22.0, height: 22.0)
self.indicatorNode.frame = CGRect(origin: CGPoint(x: floor((size.width - indicatorSize.width) / 2.0), y: floor((size.height - indicatorSize.height) / 2.0)), size: indicatorSize)
}
}