small bug fixes
This commit is contained in:
@@ -1,9 +1,34 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace cfs_tracker.ViewModels;
|
||||
|
||||
public class MonthSectionViewModel
|
||||
public partial class MonthSectionViewModel : ObservableObject
|
||||
{
|
||||
public string Title { get; init; } = string.Empty;
|
||||
private string _title = string.Empty;
|
||||
private bool _isLoading = true;
|
||||
|
||||
public string Title
|
||||
{
|
||||
get => _title;
|
||||
set => SetProperty(ref _title, value);
|
||||
}
|
||||
|
||||
public bool IsLoading
|
||||
{
|
||||
get => _isLoading;
|
||||
set => SetProperty(ref _isLoading, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<MonthCellViewModel> Cells { get; } = new();
|
||||
|
||||
public void ReplaceCells(IEnumerable<MonthCellViewModel> cells)
|
||||
{
|
||||
Cells.Clear();
|
||||
|
||||
foreach (var cell in cells)
|
||||
Cells.Add(cell);
|
||||
|
||||
IsLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user