mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix video editing for existing messages
This commit is contained in:
parent
b8c06ddffe
commit
37947173d9
@ -40,6 +40,13 @@
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
if (![url.absoluteString.lowercaseString hasSuffix:@".mp4"]) {
|
||||
NSURL *pathUrl = [NSURL fileURLWithPath:[[[LegacyComponentsGlobals provider] dataStoragePath] stringByAppendingPathComponent:@"videos"]];
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:pathUrl.path withIntermediateDirectories:true attributes:nil error:nil];
|
||||
NSURL *updatedUrl = [pathUrl URLByAppendingPathComponent:[NSString stringWithFormat:@"%@.mp4", [TGStringUtils md5:url.absoluteString]]];
|
||||
[[NSFileManager defaultManager] createSymbolicLinkAtPath:updatedUrl.path withDestinationPath:url.path error:nil];
|
||||
url = updatedUrl;
|
||||
}
|
||||
_cachedAVAsset = [[AVURLAsset alloc] initWithURL:url options:nil];
|
||||
_cachedSize = CGSizeZero;
|
||||
_cachedDuration = 0.0;
|
||||
|
@ -204,7 +204,9 @@
|
||||
}
|
||||
};
|
||||
|
||||
[model.interfaceView immediateEditorTransitionIn];
|
||||
if (paint) {
|
||||
[model.interfaceView immediateEditorTransitionIn];
|
||||
}
|
||||
|
||||
for (UIView *view in snapshots) {
|
||||
[galleryController.view addSubview:view];
|
||||
|
Loading…
x
Reference in New Issue
Block a user