mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Rename updatePresence() => schedulePresenceUpdate()
The method doesn't actually update anything by itself, and I want to free up the `updatePresence()` name for the actual update.
This commit is contained in:
parent
3db88fbcea
commit
e95f29cf4b
@ -94,10 +94,10 @@ namespace osu.Desktop
|
|||||||
activity.BindTo(u.NewValue.Activity);
|
activity.BindTo(u.NewValue.Activity);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
ruleset.BindValueChanged(_ => updatePresence());
|
ruleset.BindValueChanged(_ => schedulePresenceUpdate());
|
||||||
status.BindValueChanged(_ => updatePresence());
|
status.BindValueChanged(_ => schedulePresenceUpdate());
|
||||||
activity.BindValueChanged(_ => updatePresence());
|
activity.BindValueChanged(_ => schedulePresenceUpdate());
|
||||||
privacyMode.BindValueChanged(_ => updatePresence());
|
privacyMode.BindValueChanged(_ => schedulePresenceUpdate());
|
||||||
multiplayerClient.RoomUpdated += onRoomUpdated;
|
multiplayerClient.RoomUpdated += onRoomUpdated;
|
||||||
|
|
||||||
client.Initialize();
|
client.Initialize();
|
||||||
@ -111,14 +111,14 @@ namespace osu.Desktop
|
|||||||
if (client.CurrentPresence != null)
|
if (client.CurrentPresence != null)
|
||||||
client.SetPresence(null);
|
client.SetPresence(null);
|
||||||
|
|
||||||
updatePresence();
|
schedulePresenceUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onRoomUpdated() => updatePresence();
|
private void onRoomUpdated() => schedulePresenceUpdate();
|
||||||
|
|
||||||
private ScheduledDelegate? presenceUpdateDelegate;
|
private ScheduledDelegate? presenceUpdateDelegate;
|
||||||
|
|
||||||
private void updatePresence()
|
private void schedulePresenceUpdate()
|
||||||
{
|
{
|
||||||
presenceUpdateDelegate?.Cancel();
|
presenceUpdateDelegate?.Cancel();
|
||||||
presenceUpdateDelegate = Scheduler.AddDelayed(() =>
|
presenceUpdateDelegate = Scheduler.AddDelayed(() =>
|
||||||
|
Loading…
Reference in New Issue
Block a user