Refactor StundenViewModel: simplify Title property, make RefreshProperties public, and update startup logic in StundenPage to refresh data after login.

This commit is contained in:
2025-12-26 17:39:12 +01:00
parent 5148280c36
commit a4f586d445
2 changed files with 15 additions and 15 deletions

View File

@@ -58,6 +58,12 @@ public partial class StundenPage : ContentPage {
} catch (Exception ex) {
await DisplayAlert("Fehler:", ex.Message, "OK");
}
} else {
// Wenn eingeloggt, sicherstellen dass die Daten aktuell sind (besonders nach dem Login)
if (BindingContext is StundenViewModel vm) {
vm.RefreshProperties(); // Aktualisiert den Titel (Name/Vorname)
await vm.LoadDay(vm.DateToday);
}
}
}