Skip to content

Commit

Permalink
Fix install button on changes report.
Browse files Browse the repository at this point in the history
  • Loading branch information
clovett committed Jul 8, 2024
1 parent 6c2d5b9 commit 5da17d4
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Source/WPF/MoneyPackage/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap rescap">
<Identity Name="43906ChrisLovett.MyMoney.Net" Publisher="CN=Chris Lovett, O=Chris Lovett, S=Washington, C=US" Version="2.1.0.25" />
<Identity Name="43906ChrisLovett.MyMoney.Net" Publisher="CN=Chris Lovett, O=Chris Lovett, S=Washington, C=US" Version="2.1.0.26" />
<Properties>
<DisplayName>MyMoney.Net</DisplayName>
<PublisherDisplayName>Chris Lovett</PublisherDisplayName>
Expand Down
21 changes: 17 additions & 4 deletions Source/WPF/MyMoney/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4551,10 +4551,6 @@ private void OnChangeListRequestCompleted(object sender, SetupRequestEventArgs e
this.ButtonShowUpdateInfoCaption.Text = "View Updates";
this.ButtonShowUpdateInfo.Visibility = System.Windows.Visibility.Visible;
}
if (changes != null)
{
Task.Run(() => this.SaveCachedChangeList(changes));
}

// and see if we just installed a new version.
string exe = ProcessHelper.MainExecutable;
Expand All @@ -4568,6 +4564,21 @@ private void OnChangeListRequestCompleted(object sender, SetupRequestEventArgs e
this.settings.LastExeTimestamp = lastWrite;
this.ShowChangeInfo(previous, changes, e.NewVersionAvailable);
}

if (changes != null)
{
Task.Run(() => this.SaveCachedChangeList(changes));
}

}

private string GetMinimumVersion(string version1, string version2)
{
if (Version.TryParse(version1, out Version v1) && Version.TryParse(version2, out Version v2) && v1 > v2)
{
return version2;
}
return version1;
}

private void OnButtonShowUpdateInfoClick(object sender, RoutedEventArgs e)
Expand All @@ -4578,6 +4589,8 @@ private void OnButtonShowUpdateInfoClick(object sender, RoutedEventArgs e)

private void ShowChangeInfo(string previousVersion, XDocument changeList, bool installButton)
{
previousVersion = this.GetMinimumVersion(previousVersion, this.settings.ExeVersion);

if (changeList == null)
{
changeList = this.GetCachedChangeList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<ApplicationRevision>25</ApplicationRevision>
<ApplicationVersion>2.1.0.25</ApplicationVersion>
<ApplicationRevision>26</ApplicationRevision>
<ApplicationVersion>2.1.0.26</ApplicationVersion>
<BootstrapperEnabled>True</BootstrapperEnabled>
<Configuration>Release</Configuration>
<CreateWebPageOnPublish>True</CreateWebPageOnPublish>
Expand Down
3 changes: 2 additions & 1 deletion Source/WPF/MyMoney/Setup/changes.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<changes>
<change version="2.1.0.25" date="7/7/2024">
<change version="2.1.0.26" date="7/7/2024">
- Add "Export HTML..." to all reports.
- Fix install button.
</change>
<change version="2.1.0.24" date="7/6/2024">
- Add "move" transaction command so you can move a transaction and all it's attachments to a different account.
Expand Down
4 changes: 2 additions & 2 deletions Source/WPF/Version/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
// And also sync this with the MSIX package manifest in
// ~\MyMoney.Net\Source\WPF\MoneyPackage\Package.appxmanifest

[assembly: AssemblyVersion("2.1.0.25")]
[assembly: AssemblyFileVersion("2.1.0.25")]
[assembly: AssemblyVersion("2.1.0.26")]
[assembly: AssemblyFileVersion("2.1.0.26")]
4 changes: 2 additions & 2 deletions Source/WPF/Version/Version.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ApplicationRevision>25</ApplicationRevision>
<ApplicationVersion>2.1.0.25</ApplicationVersion>
<ApplicationRevision>26</ApplicationRevision>
<ApplicationVersion>2.1.0.26</ApplicationVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/WPF/Version/VersionMaster.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0.25
2.1.0.26

0 comments on commit 5da17d4

Please sign in to comment.