Files: fix cast
This commit is contained in:
parent
9e949d52ad
commit
f8a2b8caef
@ -31,7 +31,7 @@ namespace ASC.Files.Service.Core;
|
|||||||
public class FilesModule : FeedModule
|
public class FilesModule : FeedModule
|
||||||
{
|
{
|
||||||
public override Guid ProductID => WebItemManager.DocumentsProductID;
|
public override Guid ProductID => WebItemManager.DocumentsProductID;
|
||||||
public override string Name => Feed.Constants.FilesModule;
|
public override string Name => Constants.FilesModule;
|
||||||
public override string Product => "documents";
|
public override string Product => "documents";
|
||||||
protected override string DbId => "files";
|
protected override string DbId => "files";
|
||||||
|
|
||||||
@ -67,9 +67,9 @@ public class FilesModule : FeedModule
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tuple = ((File<int>, SmallShareRecord))data;
|
var fileWithShare = (FileWithShare)data;
|
||||||
var file = tuple.Item1;
|
var file = fileWithShare.File;
|
||||||
var shareRecord = tuple.Item2;
|
var shareRecord = fileWithShare.ShareRecord;
|
||||||
|
|
||||||
bool targetCond;
|
bool targetCond;
|
||||||
if (feed.Target != null)
|
if (feed.Target != null)
|
||||||
@ -105,9 +105,9 @@ public class FilesModule : FeedModule
|
|||||||
|
|
||||||
var feed1 = feed.Select(r =>
|
var feed1 = feed.Select(r =>
|
||||||
{
|
{
|
||||||
var tuple = ((File<int>, SmallShareRecord))r.Item2;
|
var fileWithShare = (FileWithShare)r.Item2;
|
||||||
|
|
||||||
return new Tuple<FeedRow, File<int>, SmallShareRecord>(r.Item1, tuple.Item1, tuple.Item2);
|
return new Tuple<FeedRow, File<int>, SmallShareRecord>(r.Item1, fileWithShare.File, fileWithShare.ShareRecord);
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
@ -31,9 +31,9 @@ namespace ASC.Files.Service.Core;
|
|||||||
public class FoldersModule : FeedModule
|
public class FoldersModule : FeedModule
|
||||||
{
|
{
|
||||||
public override Guid ProductID => WebItemManager.DocumentsProductID;
|
public override Guid ProductID => WebItemManager.DocumentsProductID;
|
||||||
public override string Name => Feed.Constants.FoldersModule;
|
public override string Name => Constants.FoldersModule;
|
||||||
public override string Product => "documents";
|
public override string Product => "documents";
|
||||||
protected override string DbId => Feed.Constants.FilesDbId;
|
protected override string DbId => Constants.FilesDbId;
|
||||||
|
|
||||||
private const string FolderItem = "folder";
|
private const string FolderItem = "folder";
|
||||||
private const string SharedFolderItem = "sharedFolder";
|
private const string SharedFolderItem = "sharedFolder";
|
||||||
@ -65,9 +65,9 @@ public class FoldersModule : FeedModule
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tuple = (Tuple<Folder<int>, SmallShareRecord>)data;
|
var folderWithShare = (FolderWithShare)data;
|
||||||
var folder = tuple.Item1;
|
var folder = folderWithShare.Folder;
|
||||||
var shareRecord = tuple.Item2;
|
var shareRecord = folderWithShare.ShareRecord;
|
||||||
|
|
||||||
bool targetCond;
|
bool targetCond;
|
||||||
if (feed.Target != null)
|
if (feed.Target != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user