diff --git a/Jugenddienst Stunden/ViewModels/StundenViewModel.cs b/Jugenddienst Stunden/ViewModels/StundenViewModel.cs index bff97cf..b2d39e3 100644 --- a/Jugenddienst Stunden/ViewModels/StundenViewModel.cs +++ b/Jugenddienst Stunden/ViewModels/StundenViewModel.cs @@ -201,12 +201,12 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable, /// private async Task LoadData() { try { - BaseResponse dat = await HoursBase.LoadBase("hours&year="+ DateToday.ToString("yyyy") + "&month=" + DateToday.ToString("MM")); + BaseResponse dat = await HoursBase.LoadBase("hours&year=" + DateToday.ToString("yyyy") + "&month=" + DateToday.ToString("MM")); _hour = dat.hour; Settings = dat.settings; - if (Settings.Version != AppInfo.Current.VersionString.Substring(0,5)) { - InfoEvent?.Invoke(this, "Version: " + AppInfo.Current.VersionString.Substring(0, 5) + " verfügbar (" + dat.settings.Version + " installiert)"); + if (Settings.Version != AppInfo.Current.VersionString.Substring(0, 5)) { + InfoEvent?.Invoke(this, "Version: " + Settings.Version + " verfügbar (" + AppInfo.Current.VersionString.Substring(0, 5) + " installiert)"); } //_hour = await HoursBase.LoadData(); RefreshProperties(); @@ -260,9 +260,9 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable, } catch (Exception e) { DayTimes = new List(); //TODO: hier könnte auch ein Fehler kommen, dann wäre InfoEvent falsch. - - if (Settings.Version!=null && Settings.Version != AppInfo.Current.VersionString.Substring(0, 5)) { - InfoEvent?.Invoke(this, "Version: " + AppInfo.Current.VersionString.Substring(0, 5) + " verfügbar (" + Settings.Version + " installiert)"); + + if (Settings.Version != null && Settings.Version != AppInfo.Current.VersionString.Substring(0, 5)) { + InfoEvent?.Invoke(this, "Version: " + Settings.Version + " verfügbar (" + AppInfo.Current.VersionString.Substring(0, 5) + " installiert)"); } else { InfoEvent?.Invoke(this, e.Message); } } finally { OnPropertyChanged(nameof(DayTotal));