Skip to content

Commit

Permalink
chore: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Andres Pineda <1900897+ajpinedam@users.noreply.github.com>
  • Loading branch information
2 people authored and ahmed605 committed Sep 13, 2023
1 parent 003f324 commit 2055c8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Uno.UWP/Devices/Sensors/Compass.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ async void ISensorEventListener.OnSensorChanged(SensorEvent? e)
return;
}

if (e.Sensor is not null && e.Sensor.Name == _accelerometer && !_lastAccelerometerSet)
if (e.Sensor?.Name == _accelerometer && !_lastAccelerometerSet)
{
e.Values?.CopyTo(_lastAccelerometer, 0);
_lastAccelerometerSet = true;
}
else
if (e.Sensor is not null && e.Sensor.Name == _magnetometer && !_lastMagnetometerSet)
if (e.Sensor?.Name == _magnetometer && !_lastMagnetometerSet)
{
e.Values?.CopyTo(_lastMagnetometer, 0);
_lastMagnetometerSet = true;
Expand Down

0 comments on commit 2055c8c

Please sign in to comment.