From 2134ef7a68256f4c296cf237e2d8ce20f6514acb Mon Sep 17 00:00:00 2001 From: Just2good Date: Wed, 24 Jul 2019 16:37:50 -0700 Subject: [PATCH] Auto Updater Fix --- App.xaml.cs | 5 ++--- README.md | 11 +++++++---- Utilities/Version.cs | 2 +- Version.cs | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/App.xaml.cs b/App.xaml.cs index e877cc3..bf27a93 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -12,15 +12,14 @@ public partial class App : Application private void AutoUpdater(object sender, StartupEventArgs e) { string currentVersion = Version.version; - string version; using (WebClient client = new WebClient()) { try { - string htmlCode = client.DownloadString("https://raw.githubusercontent.com/Just2Good/TFT-Overlay/master/Version.cs"); + string htmlCode = client.DownloadString("https://raw.githubusercontent.com/Just2good/TFT-Overlay/master/Version.cs"); int versionFind = htmlCode.IndexOf("public static string version = "); - version = htmlCode.Substring(versionFind + 32, 5); + string version = htmlCode.Substring(versionFind + 32, 5); if (currentVersion != version && Settings.Default.AutoUpdate) { var result = MessageBox.Show($"A new update is available.\nWould you like to download V{version}?", "TFT Overlay Update Available", MessageBoxButton.YesNo, MessageBoxImage.Question); diff --git a/README.md b/README.md index 145b55a..45b8951 100644 --- a/README.md +++ b/README.md @@ -23,11 +23,14 @@ ## Version History - **7.24.2019** - -[2.0.1](https://github.com/Just2good/TFT-Overlay/releases/tag/V2.0.1) - - Fullscreen by Izoyo - - Updated for 9.14B - - IT & FR Updated + -[2.0.2](https://github.com/Just2good/TFT-Overlay/releases/tag/V2.0.2) + - Fixed really dumb auto updater + -[2.0.1](https://github.com/Just2good/TFT-Overlay/releases/tag/V2.0.1) + - Fullscreen by Izoyo + - Updated for 9.14B + - IT & FR Updated + - **7.23.2019** - [1.9.9](https://github.com/Just2good/TFT-Overlay/releases/tag/V1.9.9) - Added Player Damage Chart diff --git a/Utilities/Version.cs b/Utilities/Version.cs index bb43c3f..d282972 100644 --- a/Utilities/Version.cs +++ b/Utilities/Version.cs @@ -2,6 +2,6 @@ { class Version { - public static string version = "2.0.1"; + public static string version = "2.0.2"; } } diff --git a/Version.cs b/Version.cs index c682322..3af08ea 100644 --- a/Version.cs +++ b/Version.cs @@ -2,6 +2,6 @@ { class Version { - public static string version = "2.0.1"; + public static string version = "2.0.2"; } }