mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-09 23:35:41 +00:00
fix: cache avatar only after user is retrieved
This commit is contained in:
parent
211d082b7e
commit
d9d41e6083
@ -36,6 +36,7 @@ public sealed partial class VirtualParadiseClient
|
|||||||
existing.Location = avatar.Location;
|
existing.Location = avatar.Location;
|
||||||
existing.Application = avatar.Application;
|
existing.Application = avatar.Application;
|
||||||
existing.Type = avatar.Type;
|
existing.Type = avatar.Type;
|
||||||
|
existing.User = avatar.User;
|
||||||
return existing;
|
return existing;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -89,8 +89,8 @@ public sealed partial class VirtualParadiseClient
|
|||||||
private async void OnAvatarAddNativeEvent(nint sender)
|
private async void OnAvatarAddNativeEvent(nint sender)
|
||||||
{
|
{
|
||||||
VirtualParadiseAvatar avatar = ExtractAvatar(sender);
|
VirtualParadiseAvatar avatar = ExtractAvatar(sender);
|
||||||
avatar = AddOrUpdateAvatar(avatar);
|
|
||||||
avatar.User = await GetUserAsync(vp_int(sender, IntegerAttribute.UserId)).ConfigureAwait(false);
|
avatar.User = await GetUserAsync(vp_int(sender, IntegerAttribute.UserId)).ConfigureAwait(false);
|
||||||
|
avatar = AddOrUpdateAvatar(avatar);
|
||||||
_avatarJoined.OnNext(avatar);
|
_avatarJoined.OnNext(avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user