Use direct document reads in inventory menus
This commit is contained in:
parent
294a296ccd
commit
2aea7b79fc
3 changed files with 17 additions and 18 deletions
|
|
@ -787,9 +787,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
.Aetheria()
|
||||
.Current
|
||||
.Entity
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.Latest();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -807,9 +805,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
return ResolveClient()
|
||||
.Aetheria()
|
||||
.StationRefit
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.Latest();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -828,9 +824,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
.Aetheria()
|
||||
.Current
|
||||
.Docking
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.Latest();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1139,9 +1139,7 @@ private void Update()
|
|||
.Aetheria()
|
||||
.Current
|
||||
.Entity
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult()
|
||||
.Latest()
|
||||
?.EntityKey ?? "";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -1194,9 +1192,7 @@ private void Update()
|
|||
.Aetheria()
|
||||
.Current
|
||||
.Docking
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.Latest();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1214,9 +1210,7 @@ private void Update()
|
|||
return ResolveClient()
|
||||
.Aetheria()
|
||||
.StationRefit
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.Latest();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return _handle.LatestAsync();
|
||||
}
|
||||
|
||||
public TDocument Latest()
|
||||
{
|
||||
return _handle.LatestAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Observable<TDocument> Watch()
|
||||
{
|
||||
return _handle.Watch();
|
||||
|
|
@ -245,6 +250,12 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return Document<TDocument>().LatestAsync();
|
||||
}
|
||||
|
||||
public TDocument Latest<TDocument>()
|
||||
where TDocument : class
|
||||
{
|
||||
return Document<TDocument>().Latest();
|
||||
}
|
||||
|
||||
public Observable<TDocument> Watch<TDocument>()
|
||||
where TDocument : class
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue