mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Merge branch 'beta'
This commit is contained in:
commit
53bdcd7ef7
@ -1817,6 +1817,8 @@ plist_fragment(
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
)
|
||||
|
@ -2,6 +2,7 @@ import UIKit
|
||||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import UIKitRuntimeUtils
|
||||
import ObjCRuntimeUtils
|
||||
|
||||
private let infiniteScrollSize: CGFloat = 10000.0
|
||||
private let insertionAnimationDuration: Double = 0.4
|
||||
@ -822,11 +823,27 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
||||
}
|
||||
|
||||
private var generalAccumulatedDeltaY: CGFloat = 0.0
|
||||
private var previousDidScrollTimestamp: Double = 0.0
|
||||
|
||||
private func updateScrollViewDidScroll(_ scrollView: UIScrollView, synchronous: Bool) {
|
||||
if self.ignoreScrollingEvents || scroller !== self.scroller {
|
||||
return
|
||||
}
|
||||
|
||||
/*let timestamp = CACurrentMediaTime()
|
||||
if !self.previousDidScrollTimestamp.isZero {
|
||||
let delta = timestamp - self.previousDidScrollTimestamp
|
||||
if delta < 0.1 {
|
||||
print("Scrolling delta: \(delta)")
|
||||
}
|
||||
}
|
||||
self.previousDidScrollTimestamp = timestamp
|
||||
|
||||
if let displayLink = self.scroller.getIvarValue("_scrollHeartbeat") as? CADisplayLink {
|
||||
if #available(iOS 10.0, *) {
|
||||
displayLink.preferredFramesPerSecond = 120
|
||||
}
|
||||
}*/
|
||||
|
||||
//CATransaction.begin()
|
||||
//CATransaction.setDisableActions(true)
|
||||
@ -854,7 +871,7 @@ open class ListView: ASDisplayNode, UIScrollViewAccessibilityDelegate, UIGesture
|
||||
self.trackingOffset += -deltaY
|
||||
}
|
||||
|
||||
self.enqueueUpdateVisibleItems(synchronous: synchronous)
|
||||
self.enqueueUpdateVisibleItems(synchronous: true)
|
||||
|
||||
var useScrollDynamics = false
|
||||
|
||||
|
@ -22,6 +22,8 @@ typedef enum {
|
||||
- (id _Nullable)associatedObjectForKey:(void const * _Nonnull)key;
|
||||
- (bool)checkObjectIsKindOfClass:(Class _Nonnull)targetClass;
|
||||
- (void)setClass:(Class _Nonnull)newClass;
|
||||
+ (NSArray<NSString *> * _Nonnull)getIvarList:(Class _Nonnull)classValue;
|
||||
- (id _Nullable)getIvarValue:(NSString * _Nonnull)name;
|
||||
|
||||
- (NSNumber * _Nullable)floatValueForKeyPath:(NSString * _Nonnull)keyPath;
|
||||
|
||||
|
@ -109,6 +109,34 @@
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
+ (NSArray<NSString *> * _Nonnull)getIvarList:(Class _Nonnull)classValue {
|
||||
NSMutableArray<NSString *> *result = [[NSMutableArray alloc] init];
|
||||
|
||||
unsigned int varCount;
|
||||
|
||||
Ivar *vars = class_copyIvarList(classValue, &varCount);
|
||||
|
||||
for (int i = 0; i < varCount; i++) {
|
||||
Ivar var = vars[i];
|
||||
|
||||
const char* name = ivar_getName(var);
|
||||
const char* typeEncoding = ivar_getTypeEncoding(var);
|
||||
|
||||
[result addObject:[NSString stringWithFormat:@"%s: %s", name, typeEncoding]];
|
||||
}
|
||||
|
||||
free(vars);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (id _Nullable)getIvarValue:(NSString * _Nonnull)name {
|
||||
Ivar ivar = class_getInstanceVariable([self class], [name UTF8String]);
|
||||
if (!ivar){
|
||||
return nil;
|
||||
}
|
||||
id value = object_getIvar(self, ivar);
|
||||
return value;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -1066,8 +1066,10 @@ final class PeerInfoVisualMediaPaneNode: ASDisplayNode, PeerInfoPaneNode, UIScro
|
||||
|
||||
self.updateHeaderFlashing(animated: true)
|
||||
}
|
||||
|
||||
private var previousDidScrollTimestamp: Double = 0.0
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
if let (size, sideInset, bottomInset, visibleHeight, _, _, presentationData) = self.currentParams {
|
||||
self.updateVisibleItems(size: size, sideInset: sideInset, bottomInset: bottomInset, visibleHeight: visibleHeight, theme: presentationData.theme, strings: presentationData.strings, synchronousLoad: false)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"app": "8.1",
|
||||
"app": "8.1.2",
|
||||
"bazel": "4.0.0",
|
||||
"xcode": "12.5.1"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user