Refactor PowerStatus (now called BatteryInfo)

This commit is contained in:
Christine Chen
2021-04-12 10:52:12 -04:00
parent b7e16c2fcc
commit 43b97fe0ad
8 changed files with 18 additions and 32 deletions

View File

@ -114,7 +114,7 @@ namespace osu.Game.Screens.Play
private AudioManager audioManager { get; set; }
[Resolved(CanBeNull = true)]
private PowerStatus powerStatus { get; set; }
private BatteryInfo batteryInfo { get; set; }
public PlayerLoader(Func<Player> createPlayer)
{
@ -483,11 +483,11 @@ namespace osu.Game.Screens.Play
private void showBatteryWarningIfNeeded()
{
if (powerStatus == null) return;
if (batteryInfo == null) return;
if (!batteryWarningShownOnce.Value)
{
if (powerStatus.IsLowBattery)
if (batteryInfo.IsLowBattery)
{
notificationOverlay?.Post(new BatteryWarningNotification());
batteryWarningShownOnce.Value = true;