Skip to content

Commit

Permalink
Made news popup show when not updating from v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Klocman committed Jan 1, 2018
1 parent ae068e3 commit 9cb0380
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/BulkCrapUninstaller/Forms/Helpers/NewsPopup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private NewsPopup()
public static void ShowPopup(Form owner)
{
// TODO change when adding a new message
if (Program.AssemblyVersion.Major > 4 || Program.AssemblyVersion.Minor > 0)
if (Program.PreviousVersion != null && Program.PreviousVersion.Major >= 4)
return;

using (var news = new NewsPopup())
Expand Down
5 changes: 4 additions & 1 deletion source/BulkCrapUninstaller/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ public static bool IsInstalled


private static bool? _net4IsAvailable;
public static Version PreviousVersion { get; private set; }

public static bool Net4IsAvailable
{
get
Expand Down Expand Up @@ -137,7 +139,8 @@ internal static void PrepareSettings()
if (result == null || result.Value.Equals("Reset"))
throw new FormatException();

if (new Version(result.Value) < AssemblyVersion)
PreviousVersion = new Version(result.Value);
if (PreviousVersion < AssemblyVersion)
IsAfterUpgrade = true;
//if(new Version(result) < )
}
Expand Down

0 comments on commit 9cb0380

Please sign in to comment.