From 45c0f19a9d5bcc09a9a1765b6d2a8eba82db557c Mon Sep 17 00:00:00 2001 From: glax Date: Thu, 2 Nov 2023 15:48:03 +0100 Subject: [PATCH] Added override Manga.Equals --- Tranga/Manga.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Tranga/Manga.cs b/Tranga/Manga.cs index 59daac0..d979e90 100644 --- a/Tranga/Manga.cs +++ b/Tranga/Manga.cs @@ -72,6 +72,19 @@ public struct Manga this.releaseStatus = releaseStatus; } + public override bool Equals(object? obj) + { + if (obj is not Manga compareManga) + return false; + return this.description == compareManga.description && + this.year == compareManga.year && + this.status == compareManga.status && + this.releaseStatus == compareManga.releaseStatus && + this.sortName == compareManga.sortName && + this.latestChapterAvailable.Equals(compareManga.latestChapterAvailable) && + this.tags.Equals(compareManga.tags); + } + public override string ToString() { return $"Publication {sortName} {internalId}";