MainWindow: Add feedback for users when App.CheckForUpdates finds no updates
This commit is contained in:
@ -212,11 +212,11 @@ namespace Elwig {
|
||||
if (w is UpdateDialog) return;
|
||||
}
|
||||
if (Utils.HasInternetConnectivity()) {
|
||||
Utils.RunBackground("Auto Updater", CheckForUpdates);
|
||||
Utils.RunBackground("Auto Updater", async () => await CheckForUpdates());
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task CheckForUpdates() {
|
||||
public static async Task CheckForUpdates(bool showSuccess = false) {
|
||||
if (Config.UpdateUrl == null) return;
|
||||
var latest = await Utils.GetLatestInstallerUrl(Config.UpdateUrl);
|
||||
if (latest != null && new Version(latest.Value.Version) > new Version(Version)) {
|
||||
@ -227,6 +227,9 @@ namespace Elwig {
|
||||
Current.Shutdown();
|
||||
}
|
||||
});
|
||||
} else if (showSuccess) {
|
||||
MessageBox.Show("Elwig ist auf dem aktuellsten Stand!", "Nach Updates suchen",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
private async void Menu_Help_Update_Click(object sender, RoutedEventArgs evt) {
|
||||
await App.CheckForUpdates();
|
||||
await App.CheckForUpdates(true);
|
||||
}
|
||||
|
||||
private async void Menu_Help_Smtp_Click(object sender, RoutedEventArgs evt) {
|
||||
|
Reference in New Issue
Block a user