mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various Improvements
This commit is contained in:
parent
322fda56c9
commit
db2885d7a9
50 changed files with 1081 additions and 811 deletions
|
|
@ -48,7 +48,6 @@ NSInteger UITabBarItem_addSetBadgeListener(UITabBarItem * _Nonnull item, UITabBa
|
|||
- (NSInteger)addSetSelectedImageListener:(UINavigationItemSetImageListener _Nonnull)listener;
|
||||
- (void)removeSetSelectedImageListener:(NSInteger)key;
|
||||
|
||||
- (NSObject * _Nullable)userInfo;
|
||||
- (void)setUserInfo:(NSObject * _Nullable)userInfo;
|
||||
@property (nonatomic, strong) NSString * _Nullable animationName;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ static const void *setMultipleRightBarButtonItemsListenerKey = &setMultipleRight
|
|||
static const void *setBackBarButtonItemListenerBagKey = &setBackBarButtonItemListenerBagKey;
|
||||
static const void *setBadgeListenerBagKey = &setBadgeListenerBagKey;
|
||||
static const void *badgeKey = &badgeKey;
|
||||
static const void *userInfoKey = &userInfoKey;
|
||||
static const void *animationNameKey = &animationNameKey;
|
||||
|
||||
@implementation UINavigationItem (Proxy)
|
||||
|
||||
|
|
@ -402,12 +402,16 @@ NSInteger UITabBarItem_addSetBadgeListener(UITabBarItem *item, UITabBarItemSetBa
|
|||
[(NSBag *)[self associatedObjectForKey:setSelectedImageListenerBagKey] removeItem:key];
|
||||
}
|
||||
|
||||
- (NSObject * _Nullable)userInfo {
|
||||
return [self associatedObjectForKey:userInfoKey];
|
||||
- (void)setAnimationName:(NSString *)animationName {
|
||||
[self setAssociatedObject:animationName forKey:animationNameKey];
|
||||
|
||||
// [(NSBag *)[self associatedObjectForKey:setBadgeListenerBagKey] enumerateItems:^(UITabBarItemSetBadgeListener listener) {
|
||||
// listener(badge);
|
||||
// }];
|
||||
}
|
||||
|
||||
- (void)setUserInfo:(NSObject * _Nullable)userInfo {
|
||||
[self setAssociatedObject:userInfo forKey:userInfoKey];
|
||||
- (NSString *)animationName {
|
||||
return [self associatedObjectForKey:animationNameKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue