Komentarze :)
This commit is contained in:
@@ -14,10 +14,12 @@ public class DetailedViewModel
|
|||||||
{
|
{
|
||||||
SelectedUser = user;
|
SelectedUser = user;
|
||||||
|
|
||||||
|
// Przypisanie metod asynchronicznych do poleceń
|
||||||
EditDescriptionCommand = new Command(async () => await EditDescription());
|
EditDescriptionCommand = new Command(async () => await EditDescription());
|
||||||
EditEmailCommand = new Command(async () => await EditEmail());
|
EditEmailCommand = new Command(async () => await EditEmail());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ze względu na użycie DisplayPropmtAsync, metoda musi być asynchroniczna
|
||||||
private async Task EditDescription()
|
private async Task EditDescription()
|
||||||
{
|
{
|
||||||
string result = await Shell.Current.DisplayPromptAsync(
|
string result = await Shell.Current.DisplayPromptAsync(
|
||||||
@@ -43,8 +45,7 @@ public class DetailedViewModel
|
|||||||
SelectedUser.Email
|
SelectedUser.Email
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(result))
|
if (!string.IsNullOrWhiteSpace(result)) {
|
||||||
{
|
|
||||||
SelectedUser.Email = result;
|
SelectedUser.Email = result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user