1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +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:
Bartłomiej Dach 2024-03-25 17:57:13 +01:00
parent 3db88fbcea
commit e95f29cf4b
No known key found for this signature in database

View File

@ -94,10 +94,10 @@ namespace osu.Desktop
activity.BindTo(u.NewValue.Activity);
}, true);
ruleset.BindValueChanged(_ => updatePresence());
status.BindValueChanged(_ => updatePresence());
activity.BindValueChanged(_ => updatePresence());
privacyMode.BindValueChanged(_ => updatePresence());
ruleset.BindValueChanged(_ => schedulePresenceUpdate());
status.BindValueChanged(_ => schedulePresenceUpdate());
activity.BindValueChanged(_ => schedulePresenceUpdate());
privacyMode.BindValueChanged(_ => schedulePresenceUpdate());
multiplayerClient.RoomUpdated += onRoomUpdated;
client.Initialize();
@ -111,14 +111,14 @@ namespace osu.Desktop
if (client.CurrentPresence != null)
client.SetPresence(null);
updatePresence();
schedulePresenceUpdate();
}
private void onRoomUpdated() => updatePresence();
private void onRoomUpdated() => schedulePresenceUpdate();
private ScheduledDelegate? presenceUpdateDelegate;
private void updatePresence()
private void schedulePresenceUpdate()
{
presenceUpdateDelegate?.Cancel();
presenceUpdateDelegate = Scheduler.AddDelayed(() =>