Fix incorrect disposal

This commit is contained in:
Dean Herbert 2021-11-23 18:13:05 +09:00
parent b1b6723826
commit 40cd998f99
1 changed files with 2 additions and 8 deletions

View File

@ -269,14 +269,8 @@ void convertOnlineIDs<T>() where T : RealmObject
}
}
private string? getRulesetShortNameFromLegacyID(long rulesetId)
{
if (efContextFactory == null)
return null;
using (var efContext = efContextFactory.Get())
return efContext.RulesetInfo.First(r => r.ID == rulesetId)?.ShortName;
}
private string? getRulesetShortNameFromLegacyID(long rulesetId) =>
efContextFactory?.Get().RulesetInfo.First(r => r.ID == rulesetId)?.ShortName;
/// <summary>
/// Flush any active contexts and block any further writes.