forked from NeoFreeBird/tweak
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBHDownloadInlineButton.h
More file actions
75 lines (62 loc) · 2.49 KB
/
BHDownloadInlineButton.h
File metadata and controls
75 lines (62 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//
// BHDownloadInlineButton.h
// NeoFreeBird, fixed for Twitter 10.94 / 10.94.1
//
// Original author: BandarHelal at 09/04/2022
// Modified by: actuallyaridan at 27/04/2025
//
@import UIKit;
#import "BHTManager.h"
@class T1StatusInlineActionsView; // Forward declaration instead of assuming it's imported
NS_ASSUME_NONNULL_BEGIN
@interface BHDownloadInlineButton : UIButton
{
NSUInteger _displayType;
NSUInteger _inlineActionType;
__weak T1StatusInlineActionsView *_delegate; // Added weak reference
id _buttonAnimator;
id _viewModel;
}
+ (CGSize)buttonImageSizeUsingViewModel:(id)viewModel
options:(NSUInteger)options
overrideButtonSize:(CGSize)overrideSize
account:(id)account;
@property (nonatomic, weak) T1StatusInlineActionsView *delegate; // Changed to weak
@property (nonatomic, strong, nullable) id buttonAnimator;
@property (nonatomic, assign) UIEdgeInsets hitTestEdgeInsets;
@property (nonatomic, assign) UIEdgeInsets touchInsets;
@property (nonatomic, assign) NSUInteger inlineActionType;
@property (nonatomic, assign) NSUInteger displayType;
@property (nonatomic, strong, nullable) id viewModel;
- (void)setTouchInsets:(UIEdgeInsets)touchInsets;
- (nullable id)_t1_imageNamed:(NSString *)name
fitSize:(CGSize)fitSize
fillColor:(nullable id)fillColor;
- (BOOL)shouldShowCount;
- (double)extraWidth;
- (CGFloat)trailingEdgeInset;
- (NSUInteger)touchInsetPriority;
- (NSUInteger)alternateInlineActionType;
- (NSUInteger)visibility;
- (nullable NSString *)actionSheetTitle;
- (BOOL)enabled;
// Status update methods
- (void)statusDidUpdate:(id)status
options:(NSUInteger)options
displayTextOptions:(NSUInteger)displayTextOptions
animated:(BOOL)animated;
- (void)statusDidUpdate:(id)status
options:(NSUInteger)options
displayTextOptions:(NSUInteger)displayTextOptions
animated:(BOOL)animated
featureSwitches:(nullable id)featureSwitches;
// Initializers
- (instancetype)initWithOptions:(NSUInteger)options
overrideSize:(nullable id)overrideSize
account:(nullable id)account;
- (instancetype)initWithInlineActionType:(NSUInteger)inlineActionType
options:(NSUInteger)options
overrideSize:(nullable id)overrideSize
account:(nullable id)account;
@end
NS_ASSUME_NONNULL_END