mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various Fixes
This commit is contained in:
parent
213e938392
commit
62b259b4d3
@ -13,7 +13,7 @@
|
||||
@property (nonatomic, readonly) bool isAnimation;
|
||||
@property (nonatomic, readonly) TGMediaAsset *originalAsset;
|
||||
@property (nonatomic, readonly) CGSize dimensions;
|
||||
|
||||
@property (nonatomic, readonly) NSString *uniformTypeIdentifier;
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)url;
|
||||
- (instancetype)initWithAsset:(TGMediaAsset *)asset livePhoto:(bool)livePhoto;
|
||||
|
@ -88,6 +88,11 @@
|
||||
return _cachedAVAsset;
|
||||
}
|
||||
|
||||
- (NSString *)uniformTypeIdentifier
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (SSignal *)avAsset {
|
||||
if (_originalAsset != nil) {
|
||||
if (_cachedAVAsset != nil) {
|
||||
|
@ -1107,7 +1107,11 @@
|
||||
}
|
||||
else if (self.item.avAsset != nil) {
|
||||
itemSignal = [self.item.avAsset mapToSignal:^SSignal *(AVAsset *avAsset) {
|
||||
return [SSignal single:[AVPlayerItem playerItemWithAsset:avAsset]];
|
||||
if ([avAsset isKindOfClass:[AVAsset class]]) {
|
||||
return [SSignal single:[AVPlayerItem playerItemWithAsset:avAsset]];
|
||||
} else {
|
||||
return [SSignal never];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
@ -108,6 +108,9 @@
|
||||
|
||||
+ (SSignal *)convertAVAsset:(AVAsset *)avAsset adjustments:(TGMediaVideoEditAdjustments *)adjustments watcher:(TGMediaVideoFileWatcher *)watcher inhibitAudio:(bool)inhibitAudio entityRenderer:(id<TGPhotoPaintEntityRenderer>)entityRenderer
|
||||
{
|
||||
if ([avAsset isKindOfClass:[NSURL class]]) {
|
||||
avAsset = [[AVURLAsset alloc] initWithURL:(NSURL *)avAsset options:nil];
|
||||
}
|
||||
SQueue *queue = [[SQueue alloc] init];
|
||||
|
||||
return [[SSignal alloc] initWithGenerator:^id<SDisposable>(SSubscriber *subscriber)
|
||||
|
@ -74,10 +74,10 @@ public struct Namespaces {
|
||||
public static let cachedPollResults: Int8 = 9
|
||||
public static let cachedContextResults: Int8 = 10
|
||||
public static let proximityNotificationStoredState: Int8 = 11
|
||||
public static let cachedPeerInvitationImporters: Int8 = 12
|
||||
public static let cachedPeerExportedInvitations: Int8 = 13
|
||||
public static let cachedGroupCallDisplayAsPeers: Int8 = 14
|
||||
public static let cachedAdMessageStates: Int8 = 15
|
||||
public static let cachedPeerInvitationImporters: Int8 = 16
|
||||
public static let cachedPeerExportedInvitations: Int8 = 17
|
||||
}
|
||||
|
||||
public struct UnorderedItemList {
|
||||
|
Loading…
x
Reference in New Issue
Block a user