IsEmpty Filter and other small fixes (#3142)
Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
parent
e574caf7eb
commit
07a36176de
96 changed files with 1361 additions and 1135 deletions
|
@ -1152,6 +1152,7 @@ public static class Parser
|
|||
return path.Contains("__MACOSX") || path.StartsWith("@Recently-Snapshot") || path.StartsWith("@recycle")
|
||||
|| path.StartsWith("._") || Path.GetFileName(path).StartsWith("._") || path.Contains(".qpkg")
|
||||
|| path.StartsWith("#recycle")
|
||||
|| path.Contains(".yacreaderlibrary")
|
||||
|| path.Contains(".caltrash");
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,11 @@ public class ThemeService : IThemeService
|
|||
public async Task<List<DownloadableSiteThemeDto>> GetDownloadableThemes()
|
||||
{
|
||||
const string cacheKey = "browse";
|
||||
var existingThemes = (await _unitOfWork.SiteThemeRepository.GetThemeDtos()).ToDictionary(k => k.Name);
|
||||
// Avoid a duplicate Dark issue some users faced during migration
|
||||
var existingThemes = (await _unitOfWork.SiteThemeRepository.GetThemeDtos())
|
||||
.GroupBy(k => k.Name)
|
||||
.ToDictionary(g => g.Key, g => g.First());
|
||||
|
||||
if (_cache.TryGetValue(cacheKey, out List<DownloadableSiteThemeDto>? themes) && themes != null)
|
||||
{
|
||||
foreach (var t in themes)
|
||||
|
@ -204,6 +208,13 @@ public class ThemeService : IThemeService
|
|||
/// <returns></returns>
|
||||
private async Task<IDictionary<string, ThemeMetadata>> GetReadme()
|
||||
{
|
||||
// Try and delete a Readme file if it already exists
|
||||
var existingReadmeFile = _directoryService.FileSystem.Path.Join(_directoryService.TempDirectory, "README.md");
|
||||
if (_directoryService.FileSystem.File.Exists(existingReadmeFile))
|
||||
{
|
||||
_directoryService.DeleteFiles([existingReadmeFile]);
|
||||
}
|
||||
|
||||
var tempDownloadFile = await GithubReadme.DownloadFileAsync(_directoryService.TempDirectory);
|
||||
|
||||
// Read file into Markdown
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue