|
@@ -63,6 +63,7 @@
|
|
|
#import "imageVersionUpdateFailView.h"
|
|
|
#import "privacyModeTipViewController.h"
|
|
|
#import "LoginType1ViewController.h"
|
|
|
+#import "previewFileAndFolderViewController.h"
|
|
|
|
|
|
@interface SceneDelegate ()<SetUsePWDViewControllerDelegate,GuideViewControllerDelegate,UITabBarControllerDelegate>
|
|
|
{
|
|
@@ -119,6 +120,8 @@
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(scanChangeDeviceBackFun:) name:scanChangeDeviceBackNotification object:nil];
|
|
|
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(firstDidLinkBoxFun) name:@"firstDidLinkBox" object:nil];
|
|
|
+
|
|
|
UIWindowScene *windowScene = (UIWindowScene *)scene;
|
|
|
self.window = [[UIWindow alloc] initWithWindowScene:windowScene];
|
|
|
self.window.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
|
|
@@ -552,20 +555,39 @@
|
|
|
cloudPhoneViewController *cloudVC = [[cloudPhoneViewController alloc] init];
|
|
|
BaseNavigationController *cloudPhoneNav = [[BaseNavigationController alloc] initWithRootViewController:cloudVC];
|
|
|
|
|
|
+ previewFileAndFolderViewController *fileVC = [[previewFileAndFolderViewController alloc] init];
|
|
|
+ BaseNavigationController *fileNav = [[BaseNavigationController alloc] initWithRootViewController:fileVC];
|
|
|
+
|
|
|
mineViewController *mineVC = [[mineViewController alloc] init];
|
|
|
BaseNavigationController *mineNav = [[BaseNavigationController alloc] initWithRootViewController:mineVC];
|
|
|
|
|
|
-
|
|
|
- NSArray *viewControllers = @[NasNav, cloudPhoneNav,mineNav]; // 添加更多视图控制器
|
|
|
- tabBarController.viewControllers = viewControllers;
|
|
|
|
|
|
-
|
|
|
NSString*phoneTitle = NSLocalizedString(@"tabbar_cloud_phone",nil);
|
|
|
NSString*myTitle = NSLocalizedString(@"tabbar_my_title",nil);
|
|
|
+ NSString*fileTitle = NSLocalizedString(@"my_set_no_file",nil);
|
|
|
+
|
|
|
+ //NSArray *viewControllers = @[NasNav, cloudPhoneNav,mineNav]; // 添加更多视图控制器
|
|
|
+ NSArray *viewControllers = @[NasNav,fileNav,mineNav]; // 添加更多视图控制器
|
|
|
|
|
|
- NSArray *titleArr = @[@"NAS",phoneTitle,myTitle];
|
|
|
- NSArray *imageNArr = @[@"tabbar_nas_N", @"tabbar_phone_N",@"tabbar_my_N"];
|
|
|
- NSArray *imageHArr = @[@"tabbar_nas_H", @"tabbar_phone_H",@"tabbar_my_H"];
|
|
|
+ NSArray *titleArr = @[@"NAS",fileTitle,myTitle];
|
|
|
+ NSArray *imageNArr = @[@"tabbar_nas_N", @"tabbar_file_N",@"tabbar_my_N"];
|
|
|
+ NSArray *imageHArr = @[@"tabbar_nas_H", @"tabbar_file_H",@"tabbar_my_H"];
|
|
|
+
|
|
|
+ //记录当前连接的SN
|
|
|
+ NSString* preSN = [HWDataManager getStringWithKey:Const_pre_did_link_ok_sn];
|
|
|
+ NSString *curSN = ksharedAppDelegate.DeviceThirdIdMod.data.changeSn;
|
|
|
+ if(![curSN isEqualToString:@"0333933700223110016962"]
|
|
|
+ && ![preSN isEqualToString:@"0333933700223110016962"]
|
|
|
+ && preSN.length > 0){
|
|
|
+ titleArr = @[@"NAS",phoneTitle,myTitle];
|
|
|
+ imageNArr = @[@"tabbar_nas_N", @"my_device_NO",@"tabbar_my_N"];
|
|
|
+ imageHArr = @[@"tabbar_nas_H", @"my_device_ok",@"tabbar_my_H"];
|
|
|
+
|
|
|
+ viewControllers = @[NasNav,cloudPhoneNav,mineNav];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ tabBarController.viewControllers = viewControllers;
|
|
|
|
|
|
for (int i=0; i<viewControllers.count; i++) {
|
|
|
UITabBarItem * tabBarItem = [UITabBarItem new];
|
|
@@ -615,6 +637,28 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+#pragma mark 第一次连接成功
|
|
|
+- (void)firstDidLinkBoxFun
|
|
|
+{
|
|
|
+
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+
|
|
|
+ if (ksharedAppDelegate.mainTabBar) {
|
|
|
+ NSArray *curArr = ksharedAppDelegate.mainTabBar.viewControllers;
|
|
|
+ if (curArr.count >= 3) {
|
|
|
+ BaseNavigationController *Nav = curArr[1];
|
|
|
+ UIViewController *curVC = Nav.viewControllers.firstObject;
|
|
|
+ if (![curVC isKindOfClass:[previewFileAndFolderViewController class]]) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //[self initMainTabbarFun];
|
|
|
+ [self enterMainVCFromScene];
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark 处理进来是非隐私模式的情况
|
|
|
- (void)HandleEnterNotPrivacyModeFun
|
|
|
{
|