This commit is contained in:
2025-12-18 11:53:51 +01:00
parent 74ac06b4c1
commit c336084152
3 changed files with 16 additions and 4 deletions

View File

@@ -170,9 +170,11 @@ public class ManageDataService(
private static List<T>? MergeLists<T, TKey>(List<T>? localList, List<T>? apiList, Func<T, TKey> keySelector)
{
if (localList == null || apiList == null) return null;
var dictionary = localList.ToDictionary(keySelector);
if (apiList == null && localList != null) return localList;
if (apiList != null && localList == null) return apiList;
if (apiList == null && localList == null) return null;
var dictionary = localList!.ToDictionary(keySelector);
foreach (var apiItem in apiList)
{