d11f0e46c0
clean up and fixes - Heute gefixt - Code Cleanup NotificationScheduleItemViewModel -fixed NotificationScheduleItemViewModel for Windows compat push implementation Push fixes Push benachrichtungen eingebaut - Status bei push - Push auch in background - Toggle für symtome angepasst push system change exporter update Optionen fix - Optionen aufgeteilt auf 3 tabs - Anpassungen haben jetzt Farbslider Optimierung fix
41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using cfs_tracker.Views;
|
|
|
|
namespace cfs_tracker.Services;
|
|
|
|
public sealed class NotificationNavigationService
|
|
{
|
|
private string? _pendingDate;
|
|
private string? _pendingStatus;
|
|
private bool _pendingCommit;
|
|
|
|
public void QueueQuickEntry(DateTime date, string? status = null, bool commit = false)
|
|
{
|
|
_pendingDate = date.ToString("yyyy-MM-dd");
|
|
_pendingStatus = status;
|
|
_pendingCommit = commit;
|
|
}
|
|
|
|
public async Task FlushAsync()
|
|
{
|
|
if (Shell.Current is null || string.IsNullOrWhiteSpace(_pendingDate))
|
|
return;
|
|
|
|
var date = _pendingDate;
|
|
var status = _pendingStatus;
|
|
var commit = _pendingCommit;
|
|
|
|
_pendingDate = null;
|
|
_pendingStatus = null;
|
|
_pendingCommit = false;
|
|
|
|
var route = $"{nameof(QuickEntryPage)}?date={Uri.EscapeDataString(date)}";
|
|
|
|
if (!string.IsNullOrWhiteSpace(status))
|
|
route += $"&status={Uri.EscapeDataString(status)}";
|
|
|
|
if (commit)
|
|
route += "&commit=true";
|
|
|
|
await MainThread.InvokeOnMainThreadAsync(() => Shell.Current.GoToAsync(route));
|
|
}
|
|
} |