mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-10 06:40:23 +00:00
allow to show custom activity text
This commit is contained in:
parent
86fccfd62b
commit
9ef40a1964
@ -52,10 +52,12 @@ typedef enum {
|
||||
int remoteNameIndex;
|
||||
BOOL showIcons;
|
||||
int connectingIndex;
|
||||
NSString *customActivityText;
|
||||
}
|
||||
-(void) markConnecting:(int)index; // use -1 for no connection active
|
||||
@property (nonatomic, assign) NSObject<BTDiscoveryDelegate> * delegate;
|
||||
@property (nonatomic, assign) BOOL showIcons;
|
||||
@property (nonatomic, retain) NSString *customActivityText;
|
||||
@end
|
||||
|
||||
@protocol BTDiscoveryDelegate
|
||||
|
@ -47,6 +47,7 @@
|
||||
@implementation BTDiscoveryViewController
|
||||
@synthesize showIcons;
|
||||
@synthesize delegate = _delegate;
|
||||
@synthesize customActivityText;
|
||||
|
||||
- (id) init {
|
||||
self = [super initWithStyle:UITableViewStyleGrouped];
|
||||
@ -195,7 +196,10 @@
|
||||
|
||||
int idx = [indexPath indexAtPosition:1];
|
||||
if (idx >= [bt numberOfDevicesFound]) {
|
||||
if ([bt isActivating]){
|
||||
if (customActivityText) {
|
||||
theLabel = customActivityText;
|
||||
cell.accessoryView = bluetoothActivity;
|
||||
} else if ([bt isActivating]){
|
||||
theLabel = @"Activating BTstack...";
|
||||
cell.accessoryView = bluetoothActivity;
|
||||
} else if (![bt isActive]){
|
||||
|
Loading…
x
Reference in New Issue
Block a user