diff --git a/salesbook.Maui/Core/Services/ManageDataService.cs b/salesbook.Maui/Core/Services/ManageDataService.cs index 103bbb2..faa35d8 100644 --- a/salesbook.Maui/Core/Services/ManageDataService.cs +++ b/salesbook.Maui/Core/Services/ManageDataService.cs @@ -175,9 +175,7 @@ public class ManageDataService( public async Task> GetActivityTryLocalDb(WhereCondActivity whereCond) { - List? activities; - - activities = await localDb.Get(x => + var activities = await localDb.Get(x => (whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) || (whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null && x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) || @@ -198,6 +196,7 @@ public class ManageDataService( _ = UpdateDb(activities); } + else return []; return await MapActivity(activities); } @@ -219,16 +218,7 @@ public class ManageDataService( _ = UpdateDb(activities); } - else - { - activities = await localDb.Get(x => - (whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) || - (whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null && - x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) || - (x.EffectiveTime >= whereCond.Start && x.EffectiveTime <= whereCond.End) || - (whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null)) - ); - } + else return await GetActivityTryLocalDb(whereCond); return await MapActivity(activities); } diff --git a/salesbook.Maui/salesbook.Maui.csproj b/salesbook.Maui/salesbook.Maui.csproj index 2b485a6..fd897fe 100644 --- a/salesbook.Maui/salesbook.Maui.csproj +++ b/salesbook.Maui/salesbook.Maui.csproj @@ -29,8 +29,8 @@ it.integry.salesbook - 2.1.0 - 17 + 2.1.1 + 18 14.2