Files: fix for thirdparty

This commit is contained in:
Maksim Chegulov 2022-09-28 14:11:50 +03:00
parent e098cc372b
commit ac5739f235
2 changed files with 22 additions and 7 deletions

View File

@ -969,7 +969,7 @@ internal class TagDao<T> : AbstractDao, ITagDao<T>
tempTags = tempTags.Concat(_projectsQuery(filesDbContext, tenantId, subject));
}
if (!deepSearch)
if (!deepSearch && parentFolder.FolderType != FolderType.VirtualRooms)
{
await foreach (var e in tempTags)
{

View File

@ -259,7 +259,25 @@ public class FileMarker
else if (obj.FileEntry.RootFolderType == FolderType.VirtualRooms)
{
var virtualRoomsFolderId = await _globalFolder.GetFolderVirtualRoomsAsync(_daoFactory);
userIDs.ForEach(userID => RemoveFromCahce(virtualRoomsFolderId, userID));
if (obj.FileEntry.ProviderEntry)
{
var virtualRoomsFolder = await _daoFactory.GetFolderDao<int>().GetFolderAsync(virtualRoomsFolderId);
userIDs.ForEach(userID =>
{
if (userEntriesData.TryGetValue(userID, out var value))
{
value.Add(virtualRoomsFolder);
}
else
{
userEntriesData.Add(userID, new List<FileEntry> { virtualRoomsFolder });
}
RemoveFromCahce(virtualRoomsFolderId, userID);
});
}
}
else if (obj.FileEntry.RootFolderType == FolderType.Privacy)
{
@ -751,7 +769,7 @@ public class FileMarker
{
var tagDao = _daoFactory.GetTagDao<T>();
var folderDao = _daoFactory.GetFolderDao<T>();
var totalTags = await tagDao.GetNewTagsAsync(_authContext.CurrentAccount.ID, parent, true).ToListAsync();
var totalTags = await tagDao.GetNewTagsAsync(_authContext.CurrentAccount.ID, parent, false).ToListAsync();
if (totalTags.Count <= 0)
{
@ -768,10 +786,7 @@ public class FileMarker
var countSubNew = 0;
totalTags.ForEach(tag =>
{
if (tag.EntryType == FileEntryType.File)
{
countSubNew += tag.Count;
}
countSubNew += tag.Count;
});
if (parentFolderTag == null)