Various fixes

This commit is contained in:
Ilya Laktyushin 2020-10-19 20:51:01 +04:00
parent 97303351ed
commit 8ec01e9bd2
3 changed files with 12 additions and 2 deletions

View File

@ -302,7 +302,7 @@
if (iosMajorVersion() >= 10 && [dataUTI rangeOfString:@"heic"].location != NSNotFound)
{
#if !DEBUG
//#if !DEBUG
CIContext *context = [[CIContext alloc] init];
CIImage *image = [[CIImage alloc] initWithData:imageData];
NSURL *tmpURL = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:[[NSString alloc] initWithFormat:@"%x.jpg", (int)arc4random()]]];
@ -318,7 +318,7 @@
if (range.location != NSNotFound)
fileName = [fileName stringByReplacingCharactersInRange:range withString:@".JPG"];
}
#endif
//#endif
}
TGMediaAssetImageData *data = [[TGMediaAssetImageData alloc] init];

View File

@ -762,6 +762,8 @@
return generatedItem;
}];
}]];
i++;
}
else
{
@ -863,6 +865,8 @@
return generatedItem;
}];
}]];
i++;
}
else
{
@ -983,6 +987,8 @@
id generatedItem = descriptionGenerator(dict, caption, entities, nil);
return generatedItem;
}]];
i++;
}
else
{

View File

@ -724,6 +724,10 @@ private func uploadedMediaFileContent(network: Network, postbox: Postbox, auxili
flags |= 1 << 3
}
if !file.isVideo && file.mimeType.hasPrefix("video/") {
flags |= 1 << 4
}
var stickers: [Api.InputDocument]?
for attribute in attributes {
if let attribute = attribute as? EmbeddedMediaStickersMessageAttribute {