|
@@ -464,12 +464,7 @@
|
|
|
if (timeArrModel.list.count > row) {
|
|
|
//NASFilePicDataArrModel * dataModel = timeArrModel.list[row];
|
|
|
|
|
|
- if(_isPhotoType){
|
|
|
- [self didClickPicDetailsWithSection:section withRow:row];
|
|
|
- }
|
|
|
- else{
|
|
|
- [self didClickVideoWithSection:section withRow:row];
|
|
|
- }
|
|
|
+ [self didClickPicDetailsWithSection:section withRow:row];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1109,37 +1104,13 @@
|
|
|
vc.canShareType = canShareType;
|
|
|
|
|
|
KWeakSelf
|
|
|
- vc.didNeedToRegetDataFun = ^{
|
|
|
- [weakSelf delayedGetFileListFun];
|
|
|
+ vc.didNeedDeleteFile = ^(NSString * _Nonnull filePath) {
|
|
|
+ [weakSelf deleteNetDataByFilePath:filePath];
|
|
|
};
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-#pragma mark 点击视频详情
|
|
|
-- (void)didClickVideoWithSection:(NSInteger)section withRow:(NSInteger)row{
|
|
|
-
|
|
|
- if(_curNASFilePicModel){
|
|
|
- if(section < _curNASFilePicModel.data.fileList.count){
|
|
|
- NASFilePicTimeArrModel *timeModel = _curNASFilePicModel.data.fileList[section];
|
|
|
-
|
|
|
- if(row < timeModel.list.count){
|
|
|
- NASFilePicDataArrModel *dataModel = timeModel.list[row];
|
|
|
- //videoPlayViewController *vc = [videoPlayViewController new];
|
|
|
- videoPlayByAVPlayerViewController *vc = [videoPlayByAVPlayerViewController new];
|
|
|
- vc.VideoDataMode = dataModel;
|
|
|
- [self.navigationController pushViewController:vc animated:YES];
|
|
|
-
|
|
|
- KWeakSelf
|
|
|
- vc.didNeedToRegetDataFun = ^{
|
|
|
- // [weakSelf getFileListFun];
|
|
|
- };
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- (void)gotoDownLoadFileFun
|
|
|
{
|
|
|
if(_didSelectListArr.count == 0){
|
|
@@ -1310,6 +1281,35 @@
|
|
|
|
|
|
[self.dataCollectionView reloadData];
|
|
|
}
|
|
|
+
|
|
|
+#pragma mark 图片详情删除成功后 对应删除原来获取的网络数据
|
|
|
+- (void)deleteNetDataByFilePath:(NSString*)filePath
|
|
|
+{
|
|
|
+ if(!filePath || filePath.length == 0){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ BOOL didFineFile = NO;
|
|
|
+ for (NASFilePicTimeArrModel *timeArrModel in _curNASFilePicModel.data.fileList) {
|
|
|
+ NSMutableArray *afterFilterArr = [NSMutableArray new];
|
|
|
+ for (NASFilePicDataArrModel * dataModel in timeArrModel.list) {
|
|
|
+ if(![dataModel.path isEqualToString:filePath]){
|
|
|
+ [afterFilterArr addObject:dataModel];
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ didFineFile = YES;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ timeArrModel.list = (NSArray<NASFilePicDataArrModel>*)afterFilterArr;
|
|
|
+
|
|
|
+ if(didFineFile){
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ [self.dataCollectionView reloadData];
|
|
|
+}
|
|
|
|
|
|
- (void)delayedGetFileListFun{
|
|
|
KWeakSelf
|