Skip to content

Commit

Permalink
Auto Updater Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Just2good committed Jul 24, 2019
1 parent a8af27b commit 2134ef7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
5 changes: 2 additions & 3 deletions App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Utilities/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{
class Version
{
public static string version = "2.0.1";
public static string version = "2.0.2";
}
}
2 changes: 1 addition & 1 deletion Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{
class Version
{
public static string version = "2.0.1";
public static string version = "2.0.2";
}
}

0 comments on commit 2134ef7

Please sign in to comment.