Options fix
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
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using cfs_tracker.Data;
|
||||
using cfs_tracker.Helpers;
|
||||
using cfs_tracker.Models;
|
||||
using cfs_tracker.Services;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Storage;
|
||||
|
||||
namespace cfs_tracker.ViewModels;
|
||||
|
||||
@@ -189,7 +187,8 @@ public partial class DayViewModel : ObservableObject
|
||||
};
|
||||
|
||||
var activityText = string.Empty;
|
||||
if (entry.ActivityId.HasValue && activityMap.TryGetValue(entry.ActivityId.Value, out var activityName) &&
|
||||
if (entry.ActivityId.HasValue &&
|
||||
activityMap.TryGetValue(entry.ActivityId.Value, out var activityName) &&
|
||||
!string.Equals(activityName, "Keine Tätigkeit", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
activityText = activityName;
|
||||
@@ -200,6 +199,10 @@ public partial class DayViewModel : ObservableObject
|
||||
? string.Join(", ", symptoms)
|
||||
: string.Empty;
|
||||
|
||||
var durationText = entry.ActivityDurationMinutes.HasValue && entry.ActivityDurationMinutes.Value > 0
|
||||
? TimeSpan.FromMinutes(entry.ActivityDurationMinutes.Value).ToString(@"hh\:mm")
|
||||
: string.Empty;
|
||||
|
||||
Entries.Add(new DayEntryItemViewModel
|
||||
{
|
||||
Id = entry.Id,
|
||||
@@ -209,6 +212,7 @@ public partial class DayViewModel : ObservableObject
|
||||
entry.State.ToAppearanceTextKey(),
|
||||
entry.State.ToFallbackText()),
|
||||
ActivityText = activityText,
|
||||
DurationText = durationText,
|
||||
SymptomsText = symptomText,
|
||||
IsBackfill = entry.DayPart.HasValue,
|
||||
StateColor = _appearanceService.GetColor(entry.State.ToAppearanceColorKey(), "#1F242B"),
|
||||
@@ -231,6 +235,7 @@ public partial class DayViewModel : ObservableObject
|
||||
await _healthEntryRepository.AddQuickEntryAsync(
|
||||
state: state,
|
||||
activityId: null,
|
||||
activityDurationMinutes: null,
|
||||
symptomIds: null,
|
||||
timestamp: DateTime.Now,
|
||||
source: EntrySource.App);
|
||||
@@ -347,4 +352,4 @@ public partial class DayViewModel : ObservableObject
|
||||
}
|
||||
|
||||
private static string BuildCounterText(string label, int count) => $"{label}\n{count}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user