Versionshinweis hinzugefügt
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Windows.Input;
|
||||
using CommunityToolkit.Maui.Alerts;
|
||||
using CommunityToolkit.Maui.Core;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
|
||||
namespace Jugenddienst_Stunden.ViewModels;
|
||||
@@ -195,6 +196,10 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable,
|
||||
try {
|
||||
BaseResponse dat = await HoursBase.LoadBase("hours&month=" + DateToday.ToString("MM"));
|
||||
_hour = dat.hour;
|
||||
|
||||
if (dat.settings.Version != AppInfo.Current.VersionString) {
|
||||
InfoEvent?.Invoke(this, "Du solltest deine Programmversion: " + AppInfo.Current.VersionString + " auf Version: " + dat.settings.Version + " updaten");
|
||||
}
|
||||
//_hour = await HoursBase.LoadData();
|
||||
RefreshProperties();
|
||||
} catch (Exception e) {
|
||||
@@ -217,12 +222,10 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable,
|
||||
Settings = dat.settings;
|
||||
GemeindeAktivSet = Settings.GemeindeAktivSet;
|
||||
ProjektAktivSet = Settings.ProjektAktivSet;
|
||||
|
||||
|
||||
OnPropertyChanged(nameof(GemeindeAktivSet));
|
||||
OnPropertyChanged(nameof(ProjektAktivSet));
|
||||
|
||||
|
||||
List<Sollstunden> _soll;
|
||||
TimeSpan span = TimeSpan.Zero;
|
||||
bool merker = false;
|
||||
@@ -249,7 +252,10 @@ internal partial class StundenViewModel : ObservableObject, IQueryAttributable,
|
||||
} catch (Exception e) {
|
||||
DayTimes = new List<DayTime>();
|
||||
//TODO: hier könnte auch ein Fehler kommen, dann wäre InfoEvent falsch.
|
||||
InfoEvent?.Invoke(this, e.Message);
|
||||
|
||||
if (Settings.Version != AppInfo.Current.VersionString) {
|
||||
InfoEvent?.Invoke(this, "Du solltest deine Programmversion: " + AppInfo.Current.VersionString + " auf Version: " + Settings.Version + " updaten");
|
||||
} else { InfoEvent?.Invoke(this, e.Message); }
|
||||
} finally {
|
||||
OnPropertyChanged(nameof(DayTotal));
|
||||
OnPropertyChanged(nameof(Sollstunden));
|
||||
|
||||
Reference in New Issue
Block a user