mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 23:05:37 +08:00
Document why things were done in DummyAPIAccess
This commit is contained in:
parent
786deec296
commit
1672608a87
@ -34,6 +34,7 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
public string AccessToken => "token";
|
public string AccessToken => "token";
|
||||||
|
|
||||||
|
/// <seealso cref="APIAccess.IsLoggedIn"/>
|
||||||
public bool IsLoggedIn => State.Value > APIState.Offline;
|
public bool IsLoggedIn => State.Value > APIState.Offline;
|
||||||
|
|
||||||
public string ProvidedUsername => LocalUser.Value.Username;
|
public string ProvidedUsername => LocalUser.Value.Username;
|
||||||
@ -115,6 +116,8 @@ namespace osu.Game.Online.API
|
|||||||
public void Logout()
|
public void Logout()
|
||||||
{
|
{
|
||||||
state.Value = APIState.Offline;
|
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();
|
LocalUser.Value = new GuestUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user