Skip to content

Commit

Permalink
Cleanup, actually bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
molenzwiebel committed Sep 7, 2022
1 parent b2213b6 commit 3061039
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Deceive/Deceive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
<Nullable>enable</Nullable>
<AssemblyVersion>1.11.0.0</AssemblyVersion>
<AssemblyVersion>1.12.0.0</AssemblyVersion>
<ApplicationIcon>Resources\deceive.ico</ApplicationIcon>
<LangVersion>default</LangVersion>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand Down
2 changes: 1 addition & 1 deletion Deceive/MainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ private async Task PossiblyRewriteAndResendPresenceAsync(string content, string
// Remove Legends of Runeterra presence
presence.Element("games")?.Element("bacon")?.Remove();

// Extracts current VALORANT version from the logs, so that we can show a fake
// Extracts current VALORANT from the user's own presence, so that we can show a fake
// player with the proper version and avoid "Version Mismatch" from being shown.
//
// This isn't technically necessary, but people keep coming in and asking whether
Expand Down
6 changes: 3 additions & 3 deletions Deceive/Persistence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ static Persistence()
}

// Prompted update version.
internal static string GetPromptedUpdateVersionAsync() => File.Exists(UpdateVersionPath) ? File.ReadAllText(UpdateVersionPath) : string.Empty;
internal static string GetPromptedUpdateVersion() => File.Exists(UpdateVersionPath) ? File.ReadAllText(UpdateVersionPath) : string.Empty;

internal static void SetPromptedUpdateVersionAsync(string version) => File.WriteAllText(UpdateVersionPath, version);
internal static void SetPromptedUpdateVersion(string version) => File.WriteAllText(UpdateVersionPath, version);

// Configured launch option.
internal static LaunchGame GetDefaultLaunchGameAsync()
internal static LaunchGame GetDefaultLaunchGame()
{
if (!File.Exists(DefaultLaunchGamePath))
return LaunchGame.Prompt;
Expand Down
10 changes: 5 additions & 5 deletions Deceive/StartupHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private static async Task StartDeceiveAsync(LaunchGame game, string gamePatchlin

// If launching "auto", use the persisted launch game (which defaults to prompt).
if (game is LaunchGame.Auto)
game = Persistence.GetDefaultLaunchGameAsync();
game = Persistence.GetDefaultLaunchGame();

// If prompt, display dialog.
if (game is LaunchGame.Prompt)
Expand Down Expand Up @@ -213,7 +213,7 @@ private static async Task StartDeceiveAsync(LaunchGame game, string gamePatchlin
{
Trace.WriteLine(e);
var result = MessageBox.Show(
"Unable to reconnect to the chat server. Please check your internet connection." +
"Unable to reconnect to the chat server. Please check your internet connection. " +
"If this issue persists and you can connect to chat normally without Deceive, " +
"please file a bug report through GitHub (https://github.com/molenzwiebel/Deceive) or Discord.",
DeceiveTitle,
Expand All @@ -239,10 +239,10 @@ private static void CurrentDomainOnUnhandledException(object sender, UnhandledEx
Trace.WriteLine(Environment.StackTrace);
}

private static void ListenToRiotClientExit(Process p)
private static void ListenToRiotClientExit(Process riotClientProcess)
{
p.EnableRaisingEvents = true;
p.Exited += async (sender, e) =>
riotClientProcess.EnableRaisingEvents = true;
riotClientProcess.Exited += async (sender, e) =>
{
Trace.WriteLine("Detected Riot Client exit.");
await Task.Delay(3000); // wait for a bit to ensure this is not a relaunch triggered by the RC
Expand Down
4 changes: 2 additions & 2 deletions Deceive/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ public static async Task CheckForUpdatesAsync()
return;

// Check if we have shown this before.
var latestShownVersion = Persistence.GetPromptedUpdateVersionAsync();
var latestShownVersion = Persistence.GetPromptedUpdateVersion();

// If we have, return.
if (string.IsNullOrEmpty(latestShownVersion) && latestShownVersion == latestVersion)
return;

// Show a message and record the latest shown.
Persistence.SetPromptedUpdateVersionAsync(latestVersion);
Persistence.SetPromptedUpdateVersion(latestVersion);

var result = MessageBox.Show(
$"There is a new version of Deceive available: {latestVersion}. You are currently using Deceive {DeceiveVersion}. " +
Expand Down

0 comments on commit 3061039

Please sign in to comment.