2
0

unionby isntead of concat

This commit is contained in:
Glax 2024-04-19 03:07:46 +02:00
parent 95236daf41
commit 0ab2ae03ce

View File

@ -78,7 +78,7 @@ public struct Manga
this.description = newManga.description; this.description = newManga.description;
this.coverUrl = newManga.coverUrl; this.coverUrl = newManga.coverUrl;
this.authors = authors.Union(newManga.authors).ToList(); this.authors = authors.Union(newManga.authors).ToList();
this.altTitles = altTitles.Concat(newManga.altTitles).ToDictionary(x => x.Key, x => x.Value); this.altTitles = altTitles.UnionBy(newManga.altTitles, kv => kv.Key).ToDictionary(x => x.Key, x => x.Value);
this.tags = tags.Union(newManga.tags).ToArray(); this.tags = tags.Union(newManga.tags).ToArray();
this.status = newManga.status; this.status = newManga.status;
this.releaseStatus = newManga.releaseStatus; this.releaseStatus = newManga.releaseStatus;