Push vibrations update

This commit is contained in:
2026-03-27 22:27:44 +01:00
parent 7b824b6f0c
commit 74722b5e81
6 changed files with 97 additions and 13 deletions
+15 -1
View File
@@ -1,7 +1,21 @@
using Microsoft.Maui.Storage;
namespace cfs_tracker.Services;
public sealed class NoOpNotificationScheduler : INotificationScheduler
{
private const string PrefVibrationEnabled = "notification_vibration_enabled";
public Task<bool> EnsurePermissionAsync() => Task.FromResult(true);
public Task<bool> GetVibrationEnabledAsync() =>
Task.FromResult(Preferences.Default.Get(PrefVibrationEnabled, false));
public Task SetVibrationEnabledAsync(bool isEnabled)
{
Preferences.Default.Set(PrefVibrationEnabled, isEnabled);
return Task.CompletedTask;
}
public Task SyncAsync() => Task.CompletedTask;
}
}