Update submodules

This commit is contained in:
Ilya Laktyushin 2018-12-18 11:53:26 +04:00
parent 197e44a67f
commit 0712ac4232
8 changed files with 48 additions and 17 deletions

View File

@ -3611,3 +3611,5 @@ Unused sets are archived when you add more.";
"CreatePoll.OptionPlaceholder" = "Option"; "CreatePoll.OptionPlaceholder" = "Option";
"CreatePoll.AddOption" = "Add an Option"; "CreatePoll.AddOption" = "Add an Option";
"CreatePoll.OptionsInfo" = "You can add up to 10 options."; "CreatePoll.OptionsInfo" = "You can add up to 10 options.";
"AttachmentMenu.WebSearch" = "Web Search";

View File

@ -959,15 +959,17 @@ const NSInteger TGNeoConversationControllerInitialRenderCount = 4;
return; return;
} }
TGNeoRowController *rowController = (TGNeoRowController *)controller; if ([controller isKindOfClass:[TGNeoRowController class]]) {
rowController.shouldRenderContent = ^bool TGNeoRowController *rowController = (TGNeoRowController *)controller;
{ rowController.shouldRenderContent = ^bool
__strong TGNeoConversationController *strongSelf = weakSelf; {
if (strongSelf != nil && strongSelf->_initialRendering && index >= TGNeoConversationControllerInitialRenderCount) __strong TGNeoConversationController *strongSelf = weakSelf;
return false; if (strongSelf != nil && strongSelf->_initialRendering && index >= TGNeoConversationControllerInitialRenderCount)
return false;
return true;
}; return true;
};
}
if ([model isKindOfClass:[TGBridgeMessage class]]) if ([model isKindOfClass:[TGBridgeMessage class]])
{ {

View File

@ -68,9 +68,32 @@
- (void)didReceiveRemoteNotification:(NSDictionary *)remoteNotification withCompletion:(void (^)(WKUserNotificationInterfaceType))completionHandler - (void)didReceiveRemoteNotification:(NSDictionary *)remoteNotification withCompletion:(void (^)(WKUserNotificationInterfaceType))completionHandler
{ {
NSString *titleText = remoteNotification[@"aps"][@"alert"][@"title"]; NSString *titleText = nil;
NSString *bodyText = remoteNotification[@"aps"][@"alert"][@"body"]; NSString *bodyText = nil;
[self processMessageWithUserInfo:remoteNotification defaultTitle:titleText defaultBody:bodyText completion:completionHandler]; if ([remoteNotification[@"aps"] respondsToSelector:@selector(objectForKey:)]) {
NSDictionary *aps = remoteNotification[@"aps"];
if ([aps[@"alert"] respondsToSelector:@selector(objectForKey:)]) {
NSDictionary *alert = aps[@"alert"];
if ([alert[@"body"] respondsToSelector:@selector(characterAtIndex:)]) {
bodyText = alert[@"body"];
if ([alert[@"title"] respondsToSelector:@selector(characterAtIndex:)]) {
titleText = alert[@"title"];
}
}
} else if ([aps[@"alert"] respondsToSelector:@selector(characterAtIndex:)]) {
NSString *alert = aps[@"alert"];
NSUInteger colonLocation = [alert rangeOfString:@": "].location;
if (colonLocation != NSNotFound) {
titleText = [alert substringToIndex:colonLocation];
bodyText = [alert substringFromIndex:colonLocation + 2];
} else {
bodyText = alert;
}
}
}
if (bodyText != nil) {
[self processMessageWithUserInfo:remoteNotification defaultTitle:titleText defaultBody:bodyText completion:completionHandler];
}
} }
- (void)processMessageWithUserInfo:(NSDictionary *)userInfo defaultTitle:(NSString *)defaultTitle defaultBody:(NSString *)defaultBody completion:(void (^)(WKUserNotificationInterfaceType))completionHandler - (void)processMessageWithUserInfo:(NSDictionary *)userInfo defaultTitle:(NSString *)defaultTitle defaultBody:(NSString *)defaultBody completion:(void (^)(WKUserNotificationInterfaceType))completionHandler

View File

@ -229,7 +229,11 @@
return; return;
} }
objc_setAssociatedObject(self, @selector(region), @[ [NSValue valueWithMKCoordinate:region.center], [NSValue valueWithMKCoordinateSpan:region.span] ], OBJC_ASSOCIATION_RETAIN_NONATOMIC); NSValue *center = [NSValue valueWithMKCoordinate:region.center];
NSValue *span = [NSValue valueWithMKCoordinateSpan:region.span];
if (center != nil && span != nil) {
objc_setAssociatedObject(self, @selector(region), @[ center, span ], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
[self tg_setRegion:region]; [self tg_setRegion:region];
} }

@ -1 +1 @@
Subproject commit ccabf7008cbf877a44148caab481a268d6390a3c Subproject commit 6295a3778913a03ccba1680e466070d4efeeb467

@ -1 +1 @@
Subproject commit 69991c85e2526815cf0abfcbaffbe97788f0baa9 Subproject commit a17d15e9399dbfa66918914337a03b12783183ea

@ -1 +1 @@
Subproject commit a57e0b34af5c28c3a395f9ee0858ca858625ec9a Subproject commit 81e0345f892d30dac298c6594be0e2fd9fb9ced8

@ -1 +1 @@
Subproject commit 113f0384f630dd0cacbbeac24c1a5625a8200d73 Subproject commit 84a71e9adf9b6ea120db6ba96533c523bb8ddda5