diff --git a/API/Data/Repositories/SeriesRepository.cs b/API/Data/Repositories/SeriesRepository.cs index 1aad6b349..95fb44a9f 100644 --- a/API/Data/Repositories/SeriesRepository.cs +++ b/API/Data/Repositories/SeriesRepository.cs @@ -25,22 +25,19 @@ namespace API.Data.Repositories; internal class RecentlyAddedSeries { - public int LibraryId { get; set; } - public LibraryType LibraryType { get; set; } - public DateTime Created { get; set; } - public int SeriesId { get; set; } - public string SeriesName { get; set; } - public Series Series { get; set; } - public IList Chapters { get; set; } // I don't know if I need this - public Chapter Chapter { get; set; } // for Alt implementation - public MangaFormat Format { get; set; } - public int ChapterId { get; set; } // for Alt implementation - public int VolumeId { get; set; } // for Alt implementation - public string ChapterNumber { get; set; } - public string ChapterRange { get; set; } - public string ChapterTitle { get; set; } - public bool IsSpecial { get; set; } - public int VolumeNumber { get; set; } + public int LibraryId { get; init; } + public LibraryType LibraryType { get; init; } + public DateTime Created { get; init; } + public int SeriesId { get; init; } + public string SeriesName { get; init; } + public MangaFormat Format { get; init; } + public int ChapterId { get; init; } + public int VolumeId { get; init; } + public string ChapterNumber { get; init; } + public string ChapterRange { get; init; } + public string ChapterTitle { get; init; } + public bool IsSpecial { get; init; } + public int VolumeNumber { get; init; } } public interface ISeriesRepository @@ -950,7 +947,7 @@ public class SeriesRepository : ISeriesRepository /// public async Task> GetRecentlyUpdatedSeries(int userId) { - var ret = await GetRecentlyAddedChaptersQuery(userId); + var ret = await GetRecentlyAddedChaptersQuery(userId, 150); var seriesMap = new Dictionary(); @@ -981,7 +978,7 @@ public class SeriesRepository : ISeriesRepository return seriesMap.Values.ToList(); } - private async Task> GetRecentlyAddedChaptersQuery(int userId) + private async Task> GetRecentlyAddedChaptersQuery(int userId, int maxRecords = 50) { var libraries = await _context.AppUser .Where(u => u.Id == userId) @@ -1004,7 +1001,6 @@ public class SeriesRepository : ISeriesRepository Created = c.Created, SeriesId = c.Volume.Series.Id, SeriesName = c.Volume.Series.Name, - Series = c.Volume.Series, VolumeId = c.VolumeId, ChapterId = c.Id, Format = c.Volume.Series.Format, @@ -1014,7 +1010,7 @@ public class SeriesRepository : ISeriesRepository VolumeNumber = c.Volume.Number, ChapterTitle = c.Title }) - .Take(50) + .Take(maxRecords) .Where(c => c.Created >= withinLastWeek && libraryIds.Contains(c.LibraryId)) .ToListAsync(); return ret; diff --git a/UI/Web/src/app/registration/add-email-to-account-migration-modal/add-email-to-account-migration-modal.component.ts b/UI/Web/src/app/registration/add-email-to-account-migration-modal/add-email-to-account-migration-modal.component.ts index 279c7f523..ca781fb39 100644 --- a/UI/Web/src/app/registration/add-email-to-account-migration-modal/add-email-to-account-migration-modal.component.ts +++ b/UI/Web/src/app/registration/add-email-to-account-migration-modal/add-email-to-account-migration-modal.component.ts @@ -47,8 +47,10 @@ export class AddEmailToAccountMigrationModalComponent implements OnInit { // Display the email to the user this.emailLink = email; await this.confirmService.alert('Please click this link to confirm your email. You must confirm to be able to login. You may need to log out of the current account before clicking.
' + this.emailLink + ''); + this.modal.close(true); } else { await this.confirmService.alert('Please check your email for the confirmation link. You must confirm to be able to login.'); + this.modal.close(true); } }); });