diff --git a/FreeTubeSyncer/Models/DatabaseModels/Profile.cs b/FreeTubeSyncer/Models/DatabaseModels/Profile.cs index fd795f0..954f024 100644 --- a/FreeTubeSyncer/Models/DatabaseModels/Profile.cs +++ b/FreeTubeSyncer/Models/DatabaseModels/Profile.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Text.Json; using FreeTubeSyncer.Library; @@ -38,8 +39,15 @@ public class Profile : IDataModel, IEquatable { if (other is null) return false; if (ReferenceEquals(this, other)) return true; - return _id == other._id && name == other.name && bgColor == other.bgColor && textColor == other.textColor && - subscriptions.Equals(other.subscriptions); + if (subscriptions.Count != other.subscriptions.Count) return false; + foreach (var sub in subscriptions) + { + var osub = other.subscriptions.FirstOrDefault(x => x.id == sub.id); + if (osub is null) return false; + if (!osub.Equals(sub)) return false; + } + + return _id == other._id && name == other.name && bgColor == other.bgColor && textColor == other.textColor; } public override bool Equals(object? obj)