mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Emoji fixes
This commit is contained in:
parent
ea6929fef6
commit
df6e87cc3d
@ -456,6 +456,10 @@ private final class AnimationCacheItemWriterImpl: AnimationCacheItemWriter {
|
||||
}
|
||||
|
||||
func add(with drawingBlock: (AnimationCacheItemDrawingSurface) -> Double?, proposedWidth: Int, proposedHeight: Int) {
|
||||
if proposedWidth == 0 || proposedHeight == 0 {
|
||||
self.isFailed = true
|
||||
return
|
||||
}
|
||||
if self.isFailed || self.isFinished {
|
||||
return
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -207,60 +207,60 @@ private final class AccessoryItemIconButtonNode: HighlightTrackingButtonNode {
|
||||
case .keyboard:
|
||||
if let previousInputMode = previousInputMode {
|
||||
if case .stickers = previousInputMode {
|
||||
animationName = "anim_stickerToKey"
|
||||
animationName = "input_anim_stickerToKey"
|
||||
animationMode = .animating(loop: false)
|
||||
} else if case .emoji = previousInputMode {
|
||||
animationName = "anim_smileToKey"
|
||||
animationName = "input_anim_smileToKey"
|
||||
animationMode = .animating(loop: false)
|
||||
} else if case .bot = previousInputMode {
|
||||
animationName = "anim_botToKey"
|
||||
animationName = "input_anim_botToKey"
|
||||
animationMode = .animating(loop: false)
|
||||
} else {
|
||||
animationName = "anim_stickerToKey"
|
||||
animationName = "input_anim_stickerToKey"
|
||||
}
|
||||
} else {
|
||||
animationName = "anim_stickerToKey"
|
||||
animationName = "input_anim_stickerToKey"
|
||||
}
|
||||
case .stickers:
|
||||
if let previousInputMode = previousInputMode {
|
||||
if case .keyboard = previousInputMode {
|
||||
animationName = "anim_keyToSticker"
|
||||
animationName = "input_anim_keyToSticker"
|
||||
animationMode = .animating(loop: false)
|
||||
} else if case .emoji = previousInputMode {
|
||||
animationName = "anim_smileToSticker"
|
||||
animationName = "input_anim_smileToSticker"
|
||||
animationMode = .animating(loop: false)
|
||||
colorKeys = emojiColorKeys
|
||||
} else {
|
||||
animationName = "anim_keyToSticker"
|
||||
animationName = "input_anim_keyToSticker"
|
||||
}
|
||||
} else {
|
||||
animationName = "anim_keyToSticker"
|
||||
animationName = "input_anim_keyToSticker"
|
||||
}
|
||||
case .emoji:
|
||||
if let previousInputMode = previousInputMode {
|
||||
if case .keyboard = previousInputMode {
|
||||
animationName = "anim_keyToSmile"
|
||||
animationName = "input_anim_keyToSmile"
|
||||
animationMode = .animating(loop: false)
|
||||
} else if case .stickers = previousInputMode {
|
||||
animationName = "anim_stickerToSmile"
|
||||
animationName = "input_anim_stickerToSmile"
|
||||
animationMode = .animating(loop: false)
|
||||
colorKeys = emojiColorKeys
|
||||
} else {
|
||||
animationName = "anim_keyToSmile"
|
||||
animationName = "input_anim_keyToSmile"
|
||||
}
|
||||
} else {
|
||||
animationName = "anim_keyToSmile"
|
||||
animationName = "input_anim_keyToSmile"
|
||||
}
|
||||
case .bot:
|
||||
if let previousInputMode = previousInputMode {
|
||||
if case .keyboard = previousInputMode {
|
||||
animationName = "anim_keyToBot"
|
||||
animationName = "input_anim_keyToBot"
|
||||
animationMode = .animating(loop: false)
|
||||
} else {
|
||||
animationName = "anim_keyToBot"
|
||||
animationName = "input_anim_keyToBot"
|
||||
}
|
||||
} else {
|
||||
animationName = "anim_keyToBot"
|
||||
animationName = "input_anim_keyToBot"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -169,46 +169,31 @@ void applySmoothRoundedCornersImpl(CALayer * _Nonnull layer) {
|
||||
}
|
||||
}
|
||||
|
||||
/*@interface _UIPortalView : UIView
|
||||
|
||||
@property(nonatomic, getter=_isGeometryFrozen, setter=_setGeometryFrozen:) _Bool _geometryFrozen; // @synthesize _geometryFrozen=__geometryFrozen;
|
||||
@property(nonatomic) _Bool forwardsClientHitTestingToSourceView; // @synthesize forwardsClientHitTestingToSourceView=_forwardsClientHitTestingToSourceView;
|
||||
@property(copy, nonatomic) NSString * _Nullable name; // @synthesize name=_name;
|
||||
@property(nonatomic) __weak UIView * _Nullable sourceView; // @synthesize sourceView=_sourceView;
|
||||
- (void)setCenter:(struct CGPoint)arg1;
|
||||
- (void)setBounds:(struct CGRect)arg1;
|
||||
- (void)setFrame:(struct CGRect)arg1;
|
||||
- (void)setHidden:(_Bool)arg1;
|
||||
@property(nonatomic) _Bool allowsHitTesting; // @dynamic allowsHitTesting;
|
||||
@property(nonatomic) _Bool allowsBackdropGroups; // @dynamic allowsBackdropGroups;
|
||||
@property(nonatomic) _Bool matchesPosition; // @dynamic matchesPosition;
|
||||
@property(nonatomic) _Bool matchesTransform; // @dynamic matchesTransform;
|
||||
@property(nonatomic) _Bool matchesAlpha; // @dynamic matchesAlpha;
|
||||
@property(nonatomic) _Bool hidesSourceView; // @dynamic hidesSourceView;
|
||||
- (instancetype _Nonnull)initWithFrame:(struct CGRect)arg1;
|
||||
- (instancetype _Nonnull)initWithSourceView:(UIView * _Nullable)arg1;
|
||||
|
||||
@end*/
|
||||
|
||||
UIView<UIKitPortalViewProtocol> * _Nullable makePortalView() {
|
||||
static Class portalViewClass = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
portalViewClass = NSClassFromString([@[@"_", @"UI", @"Portal", @"View"] componentsJoinedByString:@""]);
|
||||
});
|
||||
if (!portalViewClass) {
|
||||
if (@available(iOS 12.0, *)) {
|
||||
static Class portalViewClass = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
portalViewClass = NSClassFromString([@[@"_", @"UI", @"Portal", @"View"] componentsJoinedByString:@""]);
|
||||
});
|
||||
if (!portalViewClass) {
|
||||
return nil;
|
||||
}
|
||||
UIView<UIKitPortalViewProtocol> *view = [[portalViewClass alloc] init];
|
||||
if (!view) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (@available(iOS 13.0, *)) {
|
||||
view.forwardsClientHitTestingToSourceView = false;
|
||||
}
|
||||
view.matchesPosition = true;
|
||||
view.matchesTransform = true;
|
||||
view.matchesAlpha = false;
|
||||
view.allowsHitTesting = false;
|
||||
|
||||
return view;
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
UIView<UIKitPortalViewProtocol> *view = [[portalViewClass alloc] init];
|
||||
if (!view) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
view.forwardsClientHitTestingToSourceView = false;
|
||||
view.matchesPosition = true;
|
||||
view.matchesTransform = true;
|
||||
view.matchesAlpha = false;
|
||||
view.allowsHitTesting = false;
|
||||
|
||||
return view;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user