Skip to content

Commit

Permalink
修复无法修改主题的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFish-233 committed Apr 29, 2023
1 parent 73b20cb commit c22d46a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Expand Up @@ -45,7 +45,7 @@ public async Task<List<MainImageCardModel>> GetHomeNewestGameViewAsync()
var dateTime = DateTime.Now.ToCstTime().Date;
//获取即将发售
var entry_result1 = await _entryRepository.GetAll().AsNoTracking()
.Where(s => s.Type == EntryType.Game && s.Name != null && s.Name != "" && s.IsHidden != true && s.PubulishTime!=null&& s.PubulishTime.Value.Date > dateTime)
.Where(s => s.Type == EntryType.Game && s.Name != null && s.Name != "" && s.IsHidden != true && s.PubulishTime != null && s.PubulishTime.Value.Date > dateTime)
.OrderBy(s => s.PubulishTime).Take(12).ToListAsync();
if (entry_result1 != null)
{
Expand All @@ -55,9 +55,9 @@ public async Task<List<MainImageCardModel>> GetHomeNewestGameViewAsync()
{
Id = item.Id,
Image = _appHelper.GetImagePath(item.MainPicture, "app.png"),
Name = item.DisplayName ,
IsOutlink=false,
Url="entries/index/"+item.Id,
Name = item.DisplayName,
IsOutlink = false,
Url = "entries/index/" + item.Id,
CommentCount = item.CommentCount,
ReadCount = item.ReaderCount,
// DisPlayValue = _appHelper.GetStringAbbreviation(item.BriefIntroduction, 20)
Expand All @@ -74,9 +74,9 @@ public async Task<List<MainImageCardModel>> GetHomeRecentEditViewAsync()
var tempDateTimeNow = DateTime.Now.ToCstTime().Date;

var entryIds = await _entryRepository.GetAll().AsNoTracking().OrderByDescending(s => s.PubulishTime)
.Where(s => s.Type == EntryType.Game && s.PubulishTime !=null&&s.PubulishTime.Value.Date < tempDateTimeNow && s.Name != null && s.Name != "" && s.IsHidden != true).Select(s => s.Id).Take(12).ToListAsync();
.Where(s => s.Type == EntryType.Game && s.PubulishTime != null && s.PubulishTime.Value.Date < tempDateTimeNow && s.Name != null && s.Name != "" && s.IsHidden != true).Select(s => s.Id).Take(12).ToListAsync();
entryIds.AddRange(await _entryRepository.GetAll().AsNoTracking()
.Where(s => s.Type == EntryType.Game && s.Name != null && s.Name != "" && s.IsHidden != true && s.PubulishTime!=null&& s.PubulishTime.Value.Date > tempDateTimeNow)
.Where(s => s.Type == EntryType.Game && s.Name != null && s.Name != "" && s.IsHidden != true && s.PubulishTime != null && s.PubulishTime.Value.Date > tempDateTimeNow)
.OrderBy(s => s.PubulishTime).Select(s => s.Id).Take(12).ToListAsync());


Expand Down
Expand Up @@ -356,10 +356,10 @@ else
/// <returns></returns>
public async Task SaveTheme()
{
if(string.IsNullOrWhiteSpace(_theme)==false)
{
_dataCacheService.ThemeSetting.Theme = _theme;
}
//if(string.IsNullOrWhiteSpace(_theme)==false)
//{
// _dataCacheService.ThemeSetting.Theme = _theme;
//}
await _localStorage.SetItemAsync("theme", _dataCacheService.ThemeSetting);
}

Expand Down

0 comments on commit c22d46a

Please sign in to comment.