GotoAsync Variante
This commit is contained in:
@@ -11,7 +11,7 @@ using System.Globalization;
|
||||
using System;
|
||||
|
||||
|
||||
namespace Jugenddienst_Stunden.ViewModels;
|
||||
namespace Jugenddienst_Stunden.ViewModels;
|
||||
internal class StundenViewModel : ObservableObject, IQueryAttributable {
|
||||
public string Name => AppInfo.Name;
|
||||
public string Surname => AppInfo.VersionString;
|
||||
@@ -119,7 +119,7 @@ internal class StundenViewModel : ObservableObject, IQueryAttributable {
|
||||
public static string apiKey = Preferences.Default.Get("apiKey", "");
|
||||
|
||||
public StundenViewModel() {
|
||||
|
||||
|
||||
|
||||
_hour = new Types.Hours();
|
||||
LoadDataCommand = new AsyncRelayCommand(LoadData);
|
||||
@@ -139,9 +139,11 @@ internal class StundenViewModel : ObservableObject, IQueryAttributable {
|
||||
}
|
||||
|
||||
private async Task SelectEntryAsync(DayTime entry) {
|
||||
if (entry != null && entry.id != null)
|
||||
await Shell.Current.GoToAsync($"{nameof(Views.StundePage)}?load={entry.id}");
|
||||
else AlertEvent?.Invoke(this, "Auswahl enthält keine Daten");
|
||||
if (entry != null && entry.id != null) {
|
||||
var navigationParameters = new Dictionary<string, object> {{ "load", entry.id }};
|
||||
//await Shell.Current.GoToAsync($"{nameof(Views.StundePage)}?load={entry.id}");
|
||||
await Shell.Current.GoToAsync($"{nameof(Views.StundePage)}", navigationParameters);
|
||||
} else AlertEvent?.Invoke(this, "Auswahl enthält keine Daten");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user