Skip to content

Commit

Permalink
added calculation inRoom for current folder
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksimChegulov committed Dec 28, 2023
1 parent 5d96277 commit 473e947
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public async Task<FolderContentDto<T>> GetAsync<T>(DataWrapper<T> folderItems, i

var filesTask = GetFilesDto(files).ToListAsync();
var foldersTask = GetFoldersDto(folders).ToListAsync();
var currentTask = _folderDtoHelper.GetAsync(folderItems.FolderInfo);
var currentTask = GetFoldersDto(new [] { folderItems.FolderInfo }).FirstOrDefaultAsync();

var isEnableBadges = await _badgesSettingsHelper.GetEnabledForCurrentUserAsync();

Expand All @@ -166,7 +166,7 @@ public async Task<FolderContentDto<T>> GetAsync<T>(DataWrapper<T> folderItems, i
Total = folderItems.Total,
New = isEnableBadges ? folderItems.New : 0,
Count = folderItems.Entries.Count,
Current = await currentTask
Current = (FolderDto<T>)(await currentTask)
};

var tasks = await Task.WhenAll(filesTask.AsTask(), foldersTask.AsTask());
Expand Down

0 comments on commit 473e947

Please sign in to comment.