Na most jó a beküldéshez a Binding
This commit is contained in:
@@ -10,9 +10,21 @@ public partial class CheckListPage : ContentPage
|
||||
{
|
||||
private readonly ICheckListService _checkListService;
|
||||
private readonly IUserService _userService;
|
||||
private bool _isLoading;
|
||||
|
||||
|
||||
public ICommand NewCommand { get; set; }
|
||||
public ICommand ContinueCommand { get; set; }
|
||||
public bool IsLoading
|
||||
{
|
||||
get => _isLoading;
|
||||
set
|
||||
{
|
||||
_isLoading = value;
|
||||
OnPropertyChanged(nameof(IsLoading));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public CheckListPage()
|
||||
{
|
||||
@@ -55,13 +67,17 @@ public partial class CheckListPage : ContentPage
|
||||
}
|
||||
private async Task LoadCheckListTemplate()
|
||||
{
|
||||
IsLoading = true;
|
||||
var userId = _userService.GetCurrentUser()?.Id;
|
||||
CheckListTemplate.ItemsSource = await _checkListService.GetCheckListTemplates(userId ?? 1);
|
||||
IsLoading = false;
|
||||
}
|
||||
private async Task LoadCheckList()
|
||||
{
|
||||
IsLoading = true;
|
||||
var userId = _userService.GetCurrentUser()?.Id;
|
||||
CheckList.ItemsSource = await _checkListService.GetCheckLists(userId ?? 1);
|
||||
IsLoading = false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user