|
|
@@ -37,6 +37,8 @@
|
|
|
#import "ThingsForcedDelViewController.h"
|
|
|
#import "ThingsGeneralDelViewController.h"
|
|
|
|
|
|
+#import "HomeHubSelectPopupView.h"
|
|
|
+
|
|
|
#define kfThingsTableViewCellHeight 100.0f
|
|
|
#define kiCellInset 5
|
|
|
#define kiCellItem 2
|
|
|
@@ -461,8 +463,18 @@
|
|
|
- (void)addNewDevice {
|
|
|
|
|
|
ThingsAddViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"ThingsAddViewController" storyboardName:@"Things"];
|
|
|
- vc.selectHub = _selectHub;
|
|
|
- [self presentViewController:vc animated:YES completion:nil];
|
|
|
+ if ([[JDFacade facade].loginUser isMultiHomeHub] && _selectHub == nil) {
|
|
|
+ HomeHubSelectPopupView *hpopup = [[HomeHubSelectPopupView alloc] initFromNib];
|
|
|
+ [hpopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
|
|
|
+ if (buttonIndex == 0) {
|
|
|
+ vc.selectHub = hpopup.selectedDeviceModel;
|
|
|
+ [self presentViewController:vc animated:YES completion:nil];
|
|
|
+ }
|
|
|
+ }];
|
|
|
+ } else {
|
|
|
+ vc.selectHub = _selectHub;
|
|
|
+ [self presentViewController:vc animated:YES completion:nil];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- (void)refreshDeviceList {
|