1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Document why things were done in DummyAPIAccess

This commit is contained in:
Bartłomiej Dach 2023-06-22 23:08:30 +02:00
parent 786deec296
commit 1672608a87
No known key found for this signature in database

View File

@ -34,6 +34,7 @@ namespace osu.Game.Online.API
public string AccessToken => "token";
/// <seealso cref="APIAccess.IsLoggedIn"/>
public bool IsLoggedIn => State.Value > APIState.Offline;
public string ProvidedUsername => LocalUser.Value.Username;
@ -115,6 +116,8 @@ namespace osu.Game.Online.API
public void Logout()
{
state.Value = APIState.Offline;
// must happen after `state.Value` is changed such that subscribers to that bindable's value changes see the correct user.
// compare: `APIAccess.Logout()`.
LocalUser.Value = new GuestUser();
}