Keep compass responsive in north-up mode

This commit is contained in:
livio committed 2026-10-05 01:18:28 +02:00
1 parent a15c8e0b36
commit 260e0a3df5
3 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -680,7 +680,7 @@
<label>
Orientamento bussola
<select @bind="CompassMode" @bind:after="ApplyCompassOptions" disabled="@(!ShowCompass)">
<option value="fixed">Nord fisso in alto</option>
<option value="fixed">Mappa: nord fisso in alto</option>
<option value="heading">Navigatore: direzione del dispositivo in alto</option>
</select>
</label>
@@ -2862,7 +2862,7 @@
private Task ConfigureCompassSensorAsync()
{
var compass = Microsoft.Maui.Devices.Sensors.Compass.Default;
var shouldMonitor = ShowCompass && CompassMode == "heading" && compass.IsSupported;
var shouldMonitor = ShowCompass && compass.IsSupported;
try
{
if (shouldMonitor && !CompassSensorSubscribed)
@@ -2897,7 +2897,7 @@
object? sender,
Microsoft.Maui.Devices.Sensors.CompassChangedEventArgs args)
{
if (!MapReady || !ShowCompass || CompassMode != "heading")
if (!MapReady || !ShowCompass)
{
return;
}