Skip to content

Commit

Permalink
Moved canexexute change into reportprogress
Browse files Browse the repository at this point in the history
Bumped version and added changelog
Added opensky folder check to error handling
  • Loading branch information
sushiat committed Nov 23, 2023
1 parent 7759a9a commit 7cfcd7e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
6 changes: 6 additions & 0 deletions OpenSky.Agent/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ private static void AppDispatcherUnhandledException(

try
{
var openSkyFolder = Environment.ExpandEnvironmentVariables("%localappdata%\\OpenSky");
if (!Directory.Exists(openSkyFolder))
{
Directory.CreateDirectory(openSkyFolder);
}

File.AppendAllText(filePath, crashReport);
ModernWpf.MessageBox.Show(
e.Exception.Message + "\r\n\r\nPlease check agent_crash.log for details!",
Expand Down
4 changes: 2 additions & 2 deletions OpenSky.Agent/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
[assembly: AssemblyVersion("0.5.0")]
[assembly: AssemblyFileVersion("0.5.0")]
[assembly: AssemblyVersion("0.5.1")]
[assembly: AssemblyFileVersion("0.5.1")]

// This allows us to detect debug mode in XAML
#if DEBUG
Expand Down
7 changes: 5 additions & 2 deletions OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1906,8 +1906,11 @@ private void GetUserRoles()
var result = UserSessionService.Instance.UpdateUserRoles().Result;
if (result)
{
this.GetUserRolesCommand.ReportProgress(() => this.RefreshAircraftTypesCommand.DoExecute(null));
this.GetAircraftUpgradesCommand.CanExecute = UserSessionService.Instance.IsModerator;
this.GetUserRolesCommand.ReportProgress(() =>
{
this.RefreshAircraftTypesCommand.DoExecute(null);
this.GetAircraftUpgradesCommand.CanExecute = UserSessionService.Instance.IsModerator;
});
}
else
{
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
OpenSky Flight Tracking Agent Changelog
======================================================================================

--------------------------------------------------------------------------------------
Version 0.5.1 (ALPHA5)
--------------------------------------------------------------------------------------
- Fixed crash in aircraft type editor

--------------------------------------------------------------------------------------
Version 0.5.0 (ALPHA5)
--------------------------------------------------------------------------------------
Expand Down

0 comments on commit 7cfcd7e

Please sign in to comment.