Fix sync
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user