Skip to content

Commit 6ff5012

Browse files
author
Isaac
committed
Rating
1 parent 633b448 commit 6ff5012

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+476
-375
lines changed

submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3451,6 +3451,8 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
34513451
break
34523452
case let .peer(peerData):
34533453
if let peer = peerData.peer.peer, let message = peerData.messages.first {
3454+
let _ = context.engine.peers.ensurePeerIsLocallyAvailable(peer: peer).startStandalone()
3455+
34543456
peerContextAction(peer, .search(message.id), node, gesture, location)
34553457
}
34563458
case .groupReference:

submodules/Svg/PublicHeaders/Svg/Svg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
NSData * _Nullable prepareSvgImage(NSData * _Nonnull data, bool pattern);
88
UIImage * _Nullable renderPreparedImage(NSData * _Nonnull data, CGSize size, UIColor * _Nonnull backgroundColor, CGFloat scale, bool fit);
99

10-
UIImage * _Nullable drawSvgImage(NSData * _Nonnull data, CGSize size, UIColor * _Nullable backgroundColor, UIColor * _Nullable foregroundColor, bool opaque);
10+
UIImage * _Nullable drawSvgImage(NSData * _Nonnull data, CGSize size, UIColor * _Nullable backgroundColor, UIColor * _Nullable foregroundColor, CGFloat scale, bool opaque);
1111

1212
#endif /* Lottie_h */

submodules/Svg/Sources/Svg.m

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string {
8888

8989
@end
9090

91-
UIImage * _Nullable drawSvgImage(NSData * _Nonnull data, CGSize size, UIColor *backgroundColor, UIColor *foregroundColor, bool opaque) {
92-
NSDate *startTime = [NSDate date];
91+
UIImage * _Nullable drawSvgImage(NSData * _Nonnull data, CGSize size, UIColor *backgroundColor, UIColor *foregroundColor, CGFloat canvasScale, bool opaque) {
9392

9493
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:data];
9594
if (parser == nil) {
@@ -119,16 +118,13 @@ - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string {
119118
if (CGSizeEqualToSize(size, CGSizeZero)) {
120119
size = CGSizeMake(image->width, image->height);
121120
}
122-
123-
double deltaTime = -1.0f * [startTime timeIntervalSinceNow];
124-
printf("parseTime = %f\n", deltaTime);
125-
126-
startTime = [NSDate date];
127121

128-
UIGraphicsBeginImageContextWithOptions(size, opaque, 1.0);
122+
UIGraphicsBeginImageContextWithOptions(size, opaque, canvasScale);
129123
CGContextRef context = UIGraphicsGetCurrentContext();
130-
CGContextSetFillColorWithColor(context, backgroundColor.CGColor);
131-
CGContextFillRect(context, CGRectMake(0.0f, 0.0f, size.width, size.height));
124+
if (backgroundColor != nil) {
125+
CGContextSetFillColorWithColor(context, backgroundColor.CGColor);
126+
CGContextFillRect(context, CGRectMake(0.0f, 0.0f, size.width, size.height));
127+
}
132128

133129
CGSize svgSize = CGSizeMake(image->width, image->height);
134130
CGSize drawingSize = aspectFillSize(svgSize, size);
@@ -231,9 +227,6 @@ - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string {
231227
UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
232228
UIGraphicsEndImageContext();
233229

234-
deltaTime = -1.0f * [startTime timeIntervalSinceNow];
235-
printf("drawingTime %fx%f = %f\n", size.width, size.height, deltaTime);
236-
237230
nsvgDelete(image);
238231

239232
return resultImage;

submodules/TelegramCore/Sources/State/AccountViewTracker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2261,7 +2261,7 @@ public final class AccountViewTracker {
22612261
return -1
22622262
}
22632263
}, next: { [weak self] next, viewId in
2264-
if let strongSelf = self, let account = strongSelf.account, updateData {
2264+
if let strongSelf = self, let account = strongSelf.account {
22652265
strongSelf.updateCachedPeerData(peerId: peerId, accountPeerId: account.peerId, viewId: viewId, hasCachedData: next.cachedData != nil)
22662266
}
22672267
}, disposed: { [weak self] viewId in

submodules/TelegramUI/Components/PeerInfo/PeerInfoRatingComponent/BUILD

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ swift_library(
1313
"//submodules/Display",
1414
"//submodules/ComponentFlow",
1515
"//submodules/Components/MultilineTextComponent",
16-
"//submodules/TelegramUI/Components/TextLoadingEffect",
17-
"//submodules/Components/ComponentDisplayAdapters",
18-
"//submodules/TooltipUI",
19-
"//submodules/AccountContext",
20-
"//submodules/UIKitRuntimeUtils",
16+
"//submodules/Svg",
2117
],
2218
visibility = [
2319
"//visibility:public",

0 commit comments

Comments
 (0)