Fix `RealmLive` not working is data is attached to realm post-`ToLive` call

This commit is contained in:
Dean Herbert 2021-11-29 17:21:51 +09:00
parent 071a8c6709
commit 6dcc244e21
1 changed files with 1 additions and 3 deletions

View File

@ -17,7 +17,7 @@ public class RealmLive<T> : ILive<T> where T : RealmObject, IHasGuidPrimaryKey
{
public Guid ID { get; }
public bool IsManaged { get; }
public bool IsManaged => data.IsManaged;
private readonly SynchronizationContext? fetchedContext;
private readonly int fetchedThreadId;
@ -37,8 +37,6 @@ public RealmLive(T data)
if (data.IsManaged)
{
IsManaged = true;
fetchedContext = SynchronizationContext.Current;
fetchedThreadId = Thread.CurrentThread.ManagedThreadId;
}