From b4e1288a9b63eb820e9c9489c56aac4bf6b31067 Mon Sep 17 00:00:00 2001
From: Davin <591807572@qq.com>
Date: 星期三, 18 十二月 2024 14:34:16 +0800
Subject: [PATCH] feature 图片资源更新

---
 EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceTableViewController.m |   55 ++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceTableViewController.m b/EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceTableViewController.m
index aba9ff6..609e952 100644
--- a/EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceTableViewController.m
+++ b/EZSDK/EZSDK/EZ/UIViewControllers/EZDeviceTableViewController.m
@@ -8,7 +8,7 @@
 
 #import "EZDeviceTableViewController.h"
 
-#import "EZAccessToken.h"
+#import <EZOpenSDKFramework/EZAccessToken.h>
 #import "MJRefresh.h"
 #import "DeviceListCell.h"
 #import "DDKit.h"
@@ -17,10 +17,10 @@
 #import "EZMessageListViewController.h"
 #import "EZSettingViewController.h"
 #import "EZCameraTableViewController.h"
-#import "EZAreaInfo.h"
-#import "EZUserInfo.h"
+#import <EZOpenSDKFramework/EZAreaInfo.h>
+#import <EZOpenSDKFramework/EZUserInfo.h>
 #import "Toast+UIView.h"
-#import "EZVideoTalkViewcontroller.h"
+//#import "EZVideoTalkViewcontroller.h"
 #import "EZMultiChannelRealPlayVC.h"
 #import "EZHubDebugViewController.h"
 #import "GlobalKit.h"
@@ -43,9 +43,17 @@
 
 @implementation EZDeviceTableViewController
 
+-(void)viewWillDisappear:(BOOL)animated
+{
+    //    self.navigationController.navigationBarHidden = YES;//2021-02-01 娣诲姞闅愯棌navigationBarHidden
+}
+
 - (void)viewDidLoad
 {
     [super viewDidLoad];
+    
+//    [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60)
+//     forBarMetrics:UIBarMetricsDefault];
     
     // Uncomment the following line to preserve selection between presentations.
     // self.clearsSelectionOnViewWillAppear = NO;
@@ -58,14 +66,23 @@
     //    self.title.
     
     self.logoutBtn.title = NSLocalizedString(@"Logout", @"娉ㄩ攢");
+    self.logoutBtn.title = @"";
+    [self.logoutBtn setEnabled: NO];
     
     [self checkEZIsLogin];
+    
+//    self.addButton=nil;
+    self.addButton=[[UIBarButtonItem alloc] init];
+//    self.addButton=[UIImage imageNamed:@""];
 }
 
 
 - (void)viewWillAppear:(BOOL)animated
 {
     [super viewWillAppear:animated];
+    
+    self.navigationController.navigationBar.hidden = NO;//2021-02-01
+    
     if (_needRefresh)
     {
         _needRefresh = NO;
@@ -240,7 +257,17 @@
                         return;
                     }
                     [weakSelf.deviceList removeAllObjects];
-                    [weakSelf.deviceList addObjectsFromArray:deviceList];
+                    HDLEZLog(@"鑾峰彇鍒扮殑璁惧鍒楄〃锛�%@",deviceList);
+                    NSMutableArray *finalDeviceList=[NSMutableArray arrayWithArray:deviceList];
+                    if (self.filterTypes&&self.filterTypes.count!=0) {//鍒ゆ柇鏄惁闇�瑕佽繃婊�
+                        for (EZDeviceInfo *deviceInfo in deviceList) {
+                            HDLEZLog(@"鑾峰彇鍒扮殑璁惧鍒楄〃category锛�%@",deviceInfo.category);
+                            if ([self.filterTypes containsObject:[HDLEZConstants turnNil:deviceInfo.category]]) {
+                                [finalDeviceList removeObject:deviceInfo];
+                            }
+                        }
+                    }
+                    [weakSelf.deviceList addObjectsFromArray:finalDeviceList];
                     [weakSelf.tableView reloadData];
                     [weakSelf.tableView.header endRefreshing];
                     if (weakSelf.deviceList.count == totalCount)
@@ -297,7 +324,17 @@
 //                    [weakSelf.view makeToast:error.description duration:2.0 position:@"bottom"];
 //                    return;
 //                }
-                [weakSelf.deviceList addObjectsFromArray:deviceList];
+                
+                NSMutableArray *finalDeviceList=[NSMutableArray arrayWithArray:deviceList];
+                if (self.filterTypes&&self.filterTypes.count!=0) {//鍒ゆ柇鏄惁闇�瑕佽繃婊�
+                    for (EZDeviceInfo *deviceInfo in deviceList) {
+                        if ([self.filterTypes containsObject:[HDLEZConstants turnNil:deviceInfo.category]]) {
+                            [finalDeviceList removeObject:deviceInfo];
+                        }
+                    }
+                }
+                [weakSelf.deviceList addObjectsFromArray:finalDeviceList];
+//                [weakSelf.deviceList addObjectsFromArray:deviceList];
                 [weakSelf.tableView reloadData];
                 [weakSelf.tableView.footer endRefreshing];
                 if (weakSelf.deviceList.count == totalCount)
@@ -377,9 +414,9 @@
 }
 
 - (void) go2VideoTalk:(EZDeviceInfo *)deviceInfo {
-    EZVideoTalkViewcontroller *vc = [EZVideoTalkViewcontroller videoTalkVC];
-    vc.deviceInfo = deviceInfo;
-    [self.navigationController pushViewController:vc animated:YES];
+//    EZVideoTalkViewcontroller *vc = [EZVideoTalkViewcontroller videoTalkVC];
+//    vc.deviceInfo = deviceInfo;
+//    [self.navigationController pushViewController:vc animated:YES];
 }
 
 - (IBAction)go2MultiPlay:(id)sender {

--
Gitblit v1.8.0