Bläddra i källkod

1.IM长图预览问题处理
2.IM发生消息刷新UI问题处理

Steven 4 månader sedan
förälder
incheckning
2e6bd26938

+ 4 - 61
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -1116,9 +1116,6 @@
 		BCFE54152817918600AD6786 /* MyIncomeListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCFE54132817918600AD6786 /* MyIncomeListCell.xib */; };
 		BCFE54182817BDFD00AD6786 /* IncomeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCFE54172817BDFD00AD6786 /* IncomeHeaderView.m */; };
 		BCFE541A2817BE0800AD6786 /* IncomeHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCFE54192817BE0800AD6786 /* IncomeHeaderView.xib */; };
-		BCFEE18A2AD15A27000E888F /* AudioKitEX in Frameworks */ = {isa = PBXBuildFile; productRef = BCFEE1892AD15A27000E888F /* AudioKitEX */; };
-		BCFEE1902AD15BF5000E888F /* SoundpipeAudioKit in Frameworks */ = {isa = PBXBuildFile; productRef = BCFEE18F2AD15BF5000E888F /* SoundpipeAudioKit */; };
-		BCFF4814290172C600E9293A /* AudioKit in Frameworks */ = {isa = PBXBuildFile; productRef = BCFF4813290172C600E9293A /* AudioKit */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -2984,14 +2981,12 @@
 			buildActionMask = 2147483647;
 			files = (
 				BC8B6E5A2856ED0600866917 /* UMShare.framework in Frameworks */,
-				BCFF4814290172C600E9293A /* AudioKit in Frameworks */,
 				BC8B6E642856ED0700866917 /* TencentOpenAPI.framework in Frameworks */,
 				2779334727E3148E0010E277 /* GLKit.framework in Frameworks */,
 				2779334527E314870010E277 /* VideoToolbox.framework in Frameworks */,
 				2779334327E3147C0010E277 /* OpenGLES.framework in Frameworks */,
 				BC8B6E552856ED0600866917 /* UMCommon.framework in Frameworks */,
 				BC8B6E622856ED0600866917 /* libSocialQQ.a in Frameworks */,
-				BCFEE1902AD15BF5000E888F /* SoundpipeAudioKit in Frameworks */,
 				BC8B6E612856ED0600866917 /* libWeiboSDK.a in Frameworks */,
 				BC8B6E532856ED0600866917 /* UMAPM.framework in Frameworks */,
 				2779333F27E314640010E277 /* CoreVideo.framework in Frameworks */,
@@ -3009,7 +3004,6 @@
 				BC8B6E5E2856ED0600866917 /* libWeChatSDK.a in Frameworks */,
 				2779332D27E313F50010E277 /* SafariServices.framework in Frameworks */,
 				BC8B6E5C2856ED0600866917 /* libSocialOfficialWeChat.a in Frameworks */,
-				BCFEE18A2AD15A27000E888F /* AudioKitEX in Frameworks */,
 				2779332B27E313EB0010E277 /* CoreTelephony.framework in Frameworks */,
 				2779332927E313E40010E277 /* WebKit.framework in Frameworks */,
 				2779332727E313DC0010E277 /* MobileCoreServices.framework in Frameworks */,
@@ -7317,9 +7311,6 @@
 			);
 			name = KulexiuForTeacher;
 			packageProductDependencies = (
-				BCFF4813290172C600E9293A /* AudioKit */,
-				BCFEE1892AD15A27000E888F /* AudioKitEX */,
-				BCFEE18F2AD15BF5000E888F /* SoundpipeAudioKit */,
 			);
 			productName = KulexiuForTeacher;
 			productReference = 275E8A6427E18F2300DD3F6E /* KulexiuForTeacher.app */;
@@ -7395,9 +7386,6 @@
 			);
 			mainGroup = 275E8A5B27E18F2300DD3F6E;
 			packageReferences = (
-				BCFF4812290172C600E9293A /* XCRemoteSwiftPackageReference "AudioKit" */,
-				BCFEE1882AD15A27000E888F /* XCRemoteSwiftPackageReference "AudioKitEX" */,
-				BCFEE18E2AD15BF5000E888F /* XCRemoteSwiftPackageReference "SoundpipeAudioKit" */,
 			);
 			productRefGroup = 275E8A6527E18F2300DD3F6E /* Products */;
 			projectDirPath = "";
@@ -9141,7 +9129,7 @@
 			buildSettings = {
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = P664H7S5LL;
+				DEVELOPMENT_TEAM = B2AP53HHTU;
 				GENERATE_INFOPLIST_FILE = YES;
 				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.JingMing.-KulexiuForTeacher.KulexiuForTeacherUITests";
@@ -9157,7 +9145,7 @@
 			buildSettings = {
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = P664H7S5LL;
+				DEVELOPMENT_TEAM = B2AP53HHTU;
 				GENERATE_INFOPLIST_FILE = YES;
 				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.JingMing.-KulexiuForTeacher.KulexiuForTeacherUITests";
@@ -9430,7 +9418,7 @@
 			buildSettings = {
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = P664H7S5LL;
+				DEVELOPMENT_TEAM = B2AP53HHTU;
 				GENERATE_INFOPLIST_FILE = YES;
 				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.JingMing.-KulexiuForTeacher.KulexiuForTeacherUITests";
@@ -9703,7 +9691,7 @@
 			buildSettings = {
 				CODE_SIGN_STYLE = Automatic;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = P664H7S5LL;
+				DEVELOPMENT_TEAM = B2AP53HHTU;
 				GENERATE_INFOPLIST_FILE = YES;
 				MARKETING_VERSION = 1.0;
 				PRODUCT_BUNDLE_IDENTIFIER = "com.JingMing.-KulexiuForTeacher.KulexiuForTeacherUITests";
@@ -9762,51 +9750,6 @@
 			defaultConfigurationName = Release;
 		};
 /* End XCConfigurationList section */
-
-/* Begin XCRemoteSwiftPackageReference section */
-		BCFEE1882AD15A27000E888F /* XCRemoteSwiftPackageReference "AudioKitEX" */ = {
-			isa = XCRemoteSwiftPackageReference;
-			repositoryURL = "https://github.com/AudioKit/AudioKitEX.git";
-			requirement = {
-				kind = exactVersion;
-				version = 5.4.1;
-			};
-		};
-		BCFEE18E2AD15BF5000E888F /* XCRemoteSwiftPackageReference "SoundpipeAudioKit" */ = {
-			isa = XCRemoteSwiftPackageReference;
-			repositoryURL = "https://github.com/AudioKit/SoundpipeAudioKit.git";
-			requirement = {
-				kind = exactVersion;
-				version = 5.4.1;
-			};
-		};
-		BCFF4812290172C600E9293A /* XCRemoteSwiftPackageReference "AudioKit" */ = {
-			isa = XCRemoteSwiftPackageReference;
-			repositoryURL = "https://github.com/AudioKit/AudioKit.git";
-			requirement = {
-				kind = exactVersion;
-				version = 5.4.4;
-			};
-		};
-/* End XCRemoteSwiftPackageReference section */
-
-/* Begin XCSwiftPackageProductDependency section */
-		BCFEE1892AD15A27000E888F /* AudioKitEX */ = {
-			isa = XCSwiftPackageProductDependency;
-			package = BCFEE1882AD15A27000E888F /* XCRemoteSwiftPackageReference "AudioKitEX" */;
-			productName = AudioKitEX;
-		};
-		BCFEE18F2AD15BF5000E888F /* SoundpipeAudioKit */ = {
-			isa = XCSwiftPackageProductDependency;
-			package = BCFEE18E2AD15BF5000E888F /* XCRemoteSwiftPackageReference "SoundpipeAudioKit" */;
-			productName = SoundpipeAudioKit;
-		};
-		BCFF4813290172C600E9293A /* AudioKit */ = {
-			isa = XCSwiftPackageProductDependency;
-			package = BCFF4812290172C600E9293A /* XCRemoteSwiftPackageReference "AudioKit" */;
-			productName = AudioKit;
-		};
-/* End XCSwiftPackageProductDependency section */
 	};
 	rootObject = 275E8A5C27E18F2300DD3F6E /* Project object */;
 }

+ 2 - 2
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/xcshareddata/xcschemes/KulexiuForTeacher.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1600"
+   LastUpgradeVersion = "1610"
    version = "1.7">
    <BuildAction
       parallelizeBuildables = "YES"
@@ -52,7 +52,7 @@
       </Testables>
    </TestAction>
    <LaunchAction
-      buildConfiguration = "TEST"
+      buildConfiguration = "Release"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"

+ 0 - 42
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -1,42 +0,0 @@
-{
-  "originHash" : "a837f8bf89850bead33f45d5daae366332606889619596429a3c91b8a957e646",
-  "pins" : [
-    {
-      "identity" : "audiokit",
-      "kind" : "remoteSourceControl",
-      "location" : "https://github.com/AudioKit/AudioKit.git",
-      "state" : {
-        "revision" : "576528c7618838ed3bdb967b4e176841994aa01d",
-        "version" : "5.4.4"
-      }
-    },
-    {
-      "identity" : "audiokitex",
-      "kind" : "remoteSourceControl",
-      "location" : "https://github.com/AudioKit/AudioKitEX.git",
-      "state" : {
-        "revision" : "ab5b5623e70b2f3c578a5e64ce23d3aea709bb41",
-        "version" : "5.4.1"
-      }
-    },
-    {
-      "identity" : "kissfft",
-      "kind" : "remoteSourceControl",
-      "location" : "https://github.com/AudioKit/KissFFT",
-      "state" : {
-        "revision" : "dd0636e151724b8ba2e0908eba4d99a6ff24d00c",
-        "version" : "1.0.0"
-      }
-    },
-    {
-      "identity" : "soundpipeaudiokit",
-      "kind" : "remoteSourceControl",
-      "location" : "https://github.com/AudioKit/SoundpipeAudioKit.git",
-      "state" : {
-        "revision" : "3be2802b20088de37f34f993966d918b65401a60",
-        "version" : "5.4.1"
-      }
-    }
-  ],
-  "version" : 3
-}

+ 10 - 9
KulexiuForTeacher/Podfile

@@ -38,16 +38,17 @@ install! 'cocoapods', :disable_input_output_paths => true
   pod 'AlipaySDK-iOS'
   
   # 集成聊天功能
-    pod 'TUIChat/UI_Classic'
-    # 集成会话功能
-    pod 'TUIConversation/UI_Classic'
-    # 集成群组功能
-    pod 'TUIGroup/UI_Classic'
-    # 集成搜索功能(需要购买旗舰版套餐)
-    pod 'TUISearch/UI_Classic'
+  pod 'TUIChat/UI_Classic', '7.4.4643'
+  # 集成会话功能
+  pod 'TUIConversation/UI_Classic', '7.4.4643'
+  # 集成群组功能
+  pod 'TUIGroup/UI_Classic', '7.4.4643'
+  # 集成搜索功能(需要购买旗舰版套餐)
+  pod 'TUISearch/UI_Classic', '7.4.4643'
+  
+  # 接入腾讯直播
+  pod 'TXLiteAVSDK_Professional', '11.7.15304'
 
-    # 接入腾讯直播
-    pod 'TXLiteAVSDK_Professional'
 
     
     pod 'CocoaHTTPServer'

+ 7 - 7
KulexiuForTeacher/Podfile.lock

@@ -287,11 +287,11 @@ DEPENDENCIES:
   - KSToolsLibrary (from `/Users/wangzhi/WorkSpace/TargetModule/my-local-repo/KSToolsLibrary`)
   - RSKImageCropper
   - SSZipArchive
-  - TUIChat/UI_Classic
-  - TUIConversation/UI_Classic
-  - TUIGroup/UI_Classic
-  - TUISearch/UI_Classic
-  - TXLiteAVSDK_Professional
+  - TUIChat/UI_Classic (= 7.4.4643)
+  - TUIConversation/UI_Classic (= 7.4.4643)
+  - TUIGroup/UI_Classic (= 7.4.4643)
+  - TUISearch/UI_Classic (= 7.4.4643)
+  - TXLiteAVSDK_Professional (= 11.7.15304)
   - TYCyclePagerView
   - Whiteboard
 
@@ -354,7 +354,7 @@ SPEC CHECKSUMS:
   JXCategoryView: 262d503acea0b1278c79a1c25b7332ffaef4d518
   JXPagingView: afdd2e9af09c90160dd232b970d603cc6e7ddd0e
   KSCloudAccompanyLibrary: e9edc50bba0b63b7b270389afbb31d6655255961
-  KSToolsLibrary: d0ce45c3782d7ff60867547c67f5d47e3070ddd4
+  KSToolsLibrary: c1630ddfedd31f005ed2d7dbe0162fc0eb546a99
   lottie-ios: a50d5c0160425cd4b01b852bb9578963e6d92d31
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
@@ -382,6 +382,6 @@ SPEC CHECKSUMS:
   Whiteboard: 4622f3866b7c35a9c757955619ba0a2b26d968f5
   YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
 
-PODFILE CHECKSUM: 3cb529b99cf570c0aa5ede6f020fc001883aba96
+PODFILE CHECKSUM: 83cac9b620bba9d6b75942f6915e13b500024f93
 
 COCOAPODS: 1.15.2

+ 8 - 0
KulexiuForTeacher/Pods/Local Podspecs/KSToolsLibrary.podspec.json

@@ -19,6 +19,14 @@
     "ios": "12.0"
   },
   "source_files": "KSToolsLibrary/Classes/**/*",
+  "resource_bundles": {
+    "LLPhotoBrowse": [
+      "**/LLPhotoBrowse.bundle/**/*"
+    ],
+    "WMPlayer": [
+      "**/WMPlayer.bundle/**/*"
+    ]
+  },
   "swift_versions": "5.0",
   "pod_target_xcconfig": {
     "VALID_ARCHS": "arm64"

+ 7 - 7
KulexiuForTeacher/Pods/Manifest.lock

@@ -287,11 +287,11 @@ DEPENDENCIES:
   - KSToolsLibrary (from `/Users/wangzhi/WorkSpace/TargetModule/my-local-repo/KSToolsLibrary`)
   - RSKImageCropper
   - SSZipArchive
-  - TUIChat/UI_Classic
-  - TUIConversation/UI_Classic
-  - TUIGroup/UI_Classic
-  - TUISearch/UI_Classic
-  - TXLiteAVSDK_Professional
+  - TUIChat/UI_Classic (= 7.4.4643)
+  - TUIConversation/UI_Classic (= 7.4.4643)
+  - TUIGroup/UI_Classic (= 7.4.4643)
+  - TUISearch/UI_Classic (= 7.4.4643)
+  - TXLiteAVSDK_Professional (= 11.7.15304)
   - TYCyclePagerView
   - Whiteboard
 
@@ -354,7 +354,7 @@ SPEC CHECKSUMS:
   JXCategoryView: 262d503acea0b1278c79a1c25b7332ffaef4d518
   JXPagingView: afdd2e9af09c90160dd232b970d603cc6e7ddd0e
   KSCloudAccompanyLibrary: e9edc50bba0b63b7b270389afbb31d6655255961
-  KSToolsLibrary: d0ce45c3782d7ff60867547c67f5d47e3070ddd4
+  KSToolsLibrary: c1630ddfedd31f005ed2d7dbe0162fc0eb546a99
   lottie-ios: a50d5c0160425cd4b01b852bb9578963e6d92d31
   Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
   MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
@@ -382,6 +382,6 @@ SPEC CHECKSUMS:
   Whiteboard: 4622f3866b7c35a9c757955619ba0a2b26d968f5
   YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
 
-PODFILE CHECKSUM: 3cb529b99cf570c0aa5ede6f020fc001883aba96
+PODFILE CHECKSUM: 83cac9b620bba9d6b75942f6915e13b500024f93
 
 COCOAPODS: 1.15.2

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 883 - 825
KulexiuForTeacher/Pods/Pods.xcodeproj/project.pbxproj


+ 10 - 0
KulexiuForTeacher/Pods/Pods.xcodeproj/xcuserdata/wangzhi.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -84,6 +84,16 @@
 			<key>isShown</key>
 			<false/>
 		</dict>
+		<key>KSToolsLibrary-LLPhotoBrowse.xcscheme</key>
+		<dict>
+			<key>isShown</key>
+			<false/>
+		</dict>
+		<key>KSToolsLibrary-WMPlayer.xcscheme</key>
+		<dict>
+			<key>isShown</key>
+			<false/>
+		</dict>
 		<key>KSToolsLibrary.xcscheme</key>
 		<dict>
 			<key>isShown</key>

+ 1 - 0
KulexiuForTeacher/Pods/TUIChat/TUIChat/UI_Classic/Cell/Chat/TUIImageCollectionCell.h

@@ -14,4 +14,5 @@
 @interface TUIImageCollectionCell : TUIMediaCollectionCell
 
 - (void)fillWithData:(TUIImageMessageCellData *)data;
+- (void)reloadAllView;
 @end

+ 80 - 20
KulexiuForTeacher/Pods/TUIChat/TUIChat/UI_Classic/Cell/Chat/TUIImageCollectionCell.m

@@ -19,7 +19,7 @@
     self = [super initWithFrame:frame];
     if (self) {
         self.delegate = self;
-        self.minimumZoomScale = 1.0f;
+        self.minimumZoomScale = 0.5f;
         self.maximumZoomScale = 2.0f;
         _imageNormalHeight = frame.size.height;
         _imageNormalWidth = frame.size.width;
@@ -51,6 +51,7 @@
     if (imageScaleHeight < self.frame.size.height) {
         imageY = floorf((self.frame.size.height - imageScaleHeight) / 2.0);
     }
+//    self.zoomScale = zoomScale;
     self.containerView.frame = CGRectMake(imageX, imageY, imageScaleWidth, imageScaleHeight);
     self.contentSize = CGSizeMake(imageScaleWidth, imageScaleHeight);
 }
@@ -87,17 +88,12 @@
 
 // zoom
 - (void)scrollViewDidZoom:(UIScrollView *)scrollView {
-    CGFloat imageScaleWidth = scrollView.zoomScale * self.imageNormalWidth;
-    CGFloat imageScaleHeight = scrollView.zoomScale * self.imageNormalHeight;
-    CGFloat imageX = 0;
-    CGFloat imageY = 0;
-    if (imageScaleWidth < self.frame.size.width) {
-        imageX = floorf((self.frame.size.width - imageScaleWidth) / 2.0);
-    }
-    if (imageScaleHeight < self.frame.size.height) {
-        imageY = floorf((self.frame.size.height - imageScaleHeight) / 2.0);
-    }
-    self.containerView.frame = CGRectMake(imageX, imageY, imageScaleWidth, imageScaleHeight);
+    CGFloat offsetX = (scrollView.bounds.size.width > scrollView.contentSize.width) ?
+                       (scrollView.bounds.size.width - scrollView.contentSize.width) / 2.0 : 0.0;
+    CGFloat offsetY = (scrollView.bounds.size.height > scrollView.contentSize.height) ?
+                       (scrollView.bounds.size.height - scrollView.contentSize.height) / 2.0 : 0.0;
+    self.containerView.center = CGPointMake(scrollView.contentSize.width / 2 + offsetX,
+                                            scrollView.contentSize.height / 2 + offsetY);
 }
 
 @end
@@ -127,7 +123,7 @@
     self.imageView = [[UIImageView alloc] init];
     self.imageView.layer.cornerRadius = 5.0;
     [self.imageView.layer setMasksToBounds:YES];
-    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
+    self.imageView.contentMode = UIViewContentModeScaleAspectFill;
     self.imageView.backgroundColor = [UIColor clearColor];
     [self.scrollView.containerView addSubview:self.imageView];
     self.imageView.mm_fill();
@@ -207,6 +203,19 @@
     [super fillWithData:data];
     self.imgCellData = data;
     self.imageView.image = nil;
+    
+    BOOL hasRiskContent = data.innerMessage.hasRiskContent;
+    if (hasRiskContent) {
+        self.imageView.image = TIMCommonBundleThemeImage(@"", @"icon_security_strike");
+        for (UIView *subview in self.subviews) {
+            if (subview != self.scrollView ){
+                subview.hidden = YES;
+            }
+        }
+        return;
+    }
+
+    
     if (data.thumbImage == nil) {
         [data downloadImage:TImage_Type_Thumb];
     }
@@ -220,6 +229,7 @@
       @strongify(self);
       if (thumbImage) {
           self.imageView.image = thumbImage;
+          [self adjustScale];
       }
     }];
 
@@ -228,6 +238,7 @@
       @strongify(self);
       if (largeImage) {
           self.imageView.image = largeImage;
+          [self adjustScale];
       }
     }];
     [[[RACObserve(data, largeProgress) takeUntil:self.rac_prepareForReuseSignal] distinctUntilChanged] subscribeNext:^(NSNumber *x) {
@@ -255,9 +266,11 @@
     // originImage
     [[RACObserve(data, originImage) takeUntil:self.rac_prepareForReuseSignal] subscribeNext:^(UIImage *originImage) {
       @strongify(self);
-      if (originImage) {
-          self.imageView.image = originImage;
-      }
+        if (originImage) {
+            self.imageView.image = originImage;
+            // 原图加载完成后再调整缩放比例和布局
+            [self adjustScale];
+        }
     }];
     [[[RACObserve(data, originProgress) takeUntil:self.rac_prepareForReuseSignal] distinctUntilChanged] subscribeNext:^(NSNumber *x) {
       @strongify(self);
@@ -291,20 +304,67 @@
     self.animateCircleView.tui_mm_center();
     self.downloadBtn.mm_width(31).mm_height(31).mm_right(16).mm_bottom(48);
     self.scrollView.mm_width(self.mm_w).mm_height(self.mm_h).mm__centerX(self.mm_w / 2).mm__centerY(self.mm_h / 2);
-    self.scrollView.imageNormalWidth = self.mm_w;
-    self.scrollView.imageNormalHeight = self.mm_h;
-    self.imageView.frame = self.scrollView.bounds;
+    self.scrollView.imageNormalWidth =  self.imageView.image.size.width;
+    self.scrollView.imageNormalHeight = self.imageView.image.size.height;
+    self.imageView.frame =  CGRectMake(self.scrollView.bounds.origin.x,
+                                       self.scrollView.bounds.origin.y,
+                                       self.imageView.image.size.width,
+                                       self.imageView.image.size.height);
+    
     [self.imageView layoutIfNeeded];
+
+    [self adjustScale];
 }
 
 - (void)onDeviceOrientationChange:(NSNotification *)noti {
+    [self reloadAllView];
+}
+- (void)reloadAllView {
     for (UIView *subview in self.subviews) {
         if (subview) {
-            [subview removeFromSuperview];
+            [UIView animateWithDuration:0.1 animations:^{
+                [subview removeFromSuperview];
+            }];
         }
     }
     [self setupViews];
     [self fillWithData:self.imgCellData];
+
 }
 
+#pragma mark - V2TIMAdvancedMsgListener
+- (void)onRecvMessageModified:(V2TIMMessage *)msg {
+    V2TIMMessage *imMsg = msg;
+    if (imMsg == nil || ![imMsg isKindOfClass:V2TIMMessage.class]) {
+        return;
+    }
+    if ([self.imgCellData.innerMessage.msgID isEqualToString:imMsg.msgID]) {
+        BOOL hasRiskContent = imMsg.hasRiskContent;
+        if (hasRiskContent) {
+            self.imgCellData.innerMessage = imMsg;
+            [self showRiskAlert];
+        }
+    }
+}
+
+- (void)showRiskAlert {
+    UIAlertController *ac = [UIAlertController alertControllerWithTitle:nil
+                                                                message:TIMCommonLocalizableString(TUIKitPictureCheckRisk)
+                                                         preferredStyle:UIAlertControllerStyleAlert];
+    __weak typeof(self) weakSelf = self;
+    [ac tuitheme_addAction:[UIAlertAction actionWithTitle:TIMCommonLocalizableString(TUIKitVideoCheckRiskCancel)
+                                                    style:UIAlertActionStyleCancel
+                                                  handler:^(UIAlertAction *_Nonnull action) {
+                                                    __strong typeof(weakSelf) strongSelf = weakSelf;
+                                                    [strongSelf reloadAllView];
+                                                  }]];
+
+    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:ac animated:YES completion:nil];
+}
+
+- (void)adjustScale {
+    CGFloat scale = MIN(1, Screen_Width / self.imageView.image.size.width);
+    self.scrollView.minimumZoomScale = scale;
+    [self.scrollView pictureZoomWithScale:scale];
+}
 @end

+ 1 - 2
KulexiuForTeacher/Pods/TUIChat/TUIChat/UI_Classic/Chat/TUIBaseMessageController.m

@@ -402,8 +402,7 @@
                                        callback:^{
         @strongify(self)
         [self.messageDataProvider replaceUIMsg:newUIMsg atIndex:index];
-        [self.tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:index inSection:0]]
-                              withRowAnimation:UITableViewRowAnimationNone];
+        [self.tableView reloadData];
     }];
 }
 

+ 8 - 1
KulexiuForTeacher/Pods/TUIChat/TUIChat/UI_Classic/Chat/TUIMediaView.m

@@ -3,7 +3,7 @@
 //  UIKit
 //
 //  Created by kennethmiao on 2018/9/18.
-//  Copyright © 2018 Tencent. All rights reserved.
+//  Copyright © 2018 Tencent. All rights reserved.
 //
 
 #import "TUIMediaView.h"
@@ -183,6 +183,13 @@
             TUIVideoCollectionCell *videoCell = (TUIVideoCollectionCell *)cell;
             [videoCell reloadAllView];
         }
+        else if ([cell isKindOfClass:[TUIImageCollectionCell class]]) {
+            TUIImageCollectionCell *imageCell =  (TUIImageCollectionCell *)cell;
+            [imageCell reloadAllView];
+        }
+        else {
+            //empty
+        }
     }
     return cell;
 }

+ 24 - 0
KulexiuForTeacher/Pods/Target Support Files/KSToolsLibrary/ResourceBundle-LLPhotoBrowse-KSToolsLibrary-Info.plist

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>${PODS_DEVELOPMENT_LANGUAGE}</string>
+  <key>CFBundleIdentifier</key>
+  <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>${PRODUCT_NAME}</string>
+  <key>CFBundlePackageType</key>
+  <string>BNDL</string>
+  <key>CFBundleShortVersionString</key>
+  <string>0.1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1</string>
+  <key>NSPrincipalClass</key>
+  <string></string>
+</dict>
+</plist>

+ 24 - 0
KulexiuForTeacher/Pods/Target Support Files/KSToolsLibrary/ResourceBundle-WMPlayer-KSToolsLibrary-Info.plist

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>${PODS_DEVELOPMENT_LANGUAGE}</string>
+  <key>CFBundleIdentifier</key>
+  <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>${PRODUCT_NAME}</string>
+  <key>CFBundlePackageType</key>
+  <string>BNDL</string>
+  <key>CFBundleShortVersionString</key>
+  <string>0.1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1</string>
+  <key>NSPrincipalClass</key>
+  <string></string>
+</dict>
+</plist>

+ 8 - 0
KulexiuForTeacher/Pods/Target Support Files/Pods-KulexiuForTeacher/Pods-KulexiuForTeacher-resources.sh

@@ -102,6 +102,8 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManager/IQKeyboardManager.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/JXCategoryView/JXCategoryView.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView/JXPagerView.bundle"
+  install_resource "${PODS_CONFIGURATION_BUILD_DIR}/KSToolsLibrary/LLPhotoBrowse.bundle"
+  install_resource "${PODS_CONFIGURATION_BUILD_DIR}/KSToolsLibrary/WMPlayer.bundle"
   install_resource "${PODS_ROOT}/MJRefresh/MJRefresh/MJRefresh.bundle"
   install_resource "${PODS_ROOT}/RSKImageCropper/RSKImageCropper/RSKImageCropperStrings.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/Reachability/Reachability_Privacy.bundle"
@@ -135,6 +137,8 @@ if [[ "$CONFIGURATION" == "DEV" ]]; then
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManager/IQKeyboardManager.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/JXCategoryView/JXCategoryView.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView/JXPagerView.bundle"
+  install_resource "${PODS_CONFIGURATION_BUILD_DIR}/KSToolsLibrary/LLPhotoBrowse.bundle"
+  install_resource "${PODS_CONFIGURATION_BUILD_DIR}/KSToolsLibrary/WMPlayer.bundle"
   install_resource "${PODS_ROOT}/MJRefresh/MJRefresh/MJRefresh.bundle"
   install_resource "${PODS_ROOT}/RSKImageCropper/RSKImageCropper/RSKImageCropperStrings.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/Reachability/Reachability_Privacy.bundle"
@@ -168,6 +172,8 @@ if [[ "$CONFIGURATION" == "TEST" ]]; then
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManager/IQKeyboardManager.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/JXCategoryView/JXCategoryView.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView/JXPagerView.bundle"
+  install_resource "${PODS_CONFIGURATION_BUILD_DIR}/KSToolsLibrary/LLPhotoBrowse.bundle"
+  install_resource "${PODS_CONFIGURATION_BUILD_DIR}/KSToolsLibrary/WMPlayer.bundle"
   install_resource "${PODS_ROOT}/MJRefresh/MJRefresh/MJRefresh.bundle"
   install_resource "${PODS_ROOT}/RSKImageCropper/RSKImageCropper/RSKImageCropperStrings.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/Reachability/Reachability_Privacy.bundle"
@@ -201,6 +207,8 @@ if [[ "$CONFIGURATION" == "Release" ]]; then
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManager/IQKeyboardManager.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/JXCategoryView/JXCategoryView.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView/JXPagerView.bundle"
+  install_resource "${PODS_CONFIGURATION_BUILD_DIR}/KSToolsLibrary/LLPhotoBrowse.bundle"
+  install_resource "${PODS_CONFIGURATION_BUILD_DIR}/KSToolsLibrary/WMPlayer.bundle"
   install_resource "${PODS_ROOT}/MJRefresh/MJRefresh/MJRefresh.bundle"
   install_resource "${PODS_ROOT}/RSKImageCropper/RSKImageCropper/RSKImageCropperStrings.bundle"
   install_resource "${PODS_CONFIGURATION_BUILD_DIR}/Reachability/Reachability_Privacy.bundle"

Vissa filer visades inte eftersom för många filer har ändrats