File tree 1 file changed +28
-4
lines changed
1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change 13
13
- (id )_viewControllerForAncestor ;
14
14
@end
15
15
16
+ @interface YTISupportedMessageRendererIcons : NSObject
17
+ @property (nonatomic , assign , readwrite ) int iconType;
18
+ @end
19
+
20
+ @interface YTIMessageRenderer : NSObject
21
+ @property (nonatomic , strong , readwrite ) YTISupportedMessageRendererIcons *icon;
22
+ @end
23
+
24
+ @interface YTMLightweightMessageCell : UIView
25
+ @end
26
+
27
+ @interface YTMMessageView : UIView
28
+ @property (nonatomic , weak , readwrite ) YTMLightweightMessageCell *delegate;
29
+ @end
30
+
16
31
%group SettingsPage
17
32
%hook YTMAvatarAccountView
18
33
61
76
62
77
%hook YTMMessageView
63
78
- (void )setMessageText:(id )arg1 {
64
- if ([arg1 containsString: @" Premium" ]) {
65
- arg1 = LOC (@" REGIONAL_RESTRICTION" );
66
- } %orig (arg1);
79
+ if (![self .delegate isKindOfClass: %c (YTMLightweightMessageCell)]) {
80
+ return %orig ;
81
+ }
82
+
83
+ YTMLightweightMessageCell *msgCell = (YTMLightweightMessageCell *)self.delegate ;
84
+ YTIMessageRenderer *renderer = [msgCell valueForKey: @" _renderer" ];
85
+
86
+ if (renderer.icon .iconType != 187 ) {
87
+ return %orig ;
88
+ }
89
+
90
+ %orig (LOC (@" REGIONAL_RESTRICTION" ));
67
91
}
68
92
%end
69
93
%end
70
94
71
95
%ctor {
72
96
%init (SettingsPage);
73
- }
97
+ }
You can’t perform that action at this time.
0 commit comments