From 0fe21336e6c06972b254733ae49457063253c021 Mon Sep 17 00:00:00 2001 From: Ben Wallis Date: Wed, 5 Dec 2018 17:06:27 +0000 Subject: [PATCH] * Fixed duplicated tooltips for sound preview buttons * If Filtration is not running in its expected installation directory it will not check for updates - this enables us to release a zip file release that won't fail an update check every time it's run --- Filtration/Filtration.nuspec | 2 ++ Filtration/Services/UpdateService.cs | 13 +++++++++++++ Filtration/Views/ItemFilterBlockView.xaml | 4 ++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Filtration/Filtration.nuspec b/Filtration/Filtration.nuspec index a1e9127..b822391 100644 --- a/Filtration/Filtration.nuspec +++ b/Filtration/Filtration.nuspec @@ -10,12 +10,14 @@ false Copyright 2018 * Added support for new Prophecies block item type +* Added Betrayal League Item Base Types and Item Classes to static data * All open filter scripts are now remembered on exit and reopened when the application is started rather than just the last opened one (#95) * Filter sections are once again now expanded by default when scripts are opened, unless the new "Auto-expand all sections when opening scripts" setting is disabled * A new Clear Styles button has been added which removes all styles from the selected block (#96) * New buttons for adding/removing DisableDropSound from selected blocks have been added (#110) * The Enable/Disable Block toggle button is now visible on both the Regular Block Items and Appearance Block Items views * When there are too many block items to fit horizontally in a block a horizontal scrollbar will now appear +* Fixed the previously incorrect handling of DisableDropSound as a true/false value when in fact it is enabled/disabled purely by its presence or lack thereof in a block (#111) * Fixed the application freezing for a long period of time when Ctrl+A (Select All) is performed * Fixed the Switch to Appearance/Regular Block Items text overlapping block items * Fixed theme saving (blank theme files were being saved) (#83) diff --git a/Filtration/Services/UpdateService.cs b/Filtration/Services/UpdateService.cs index 120f628..dcb2a15 100644 --- a/Filtration/Services/UpdateService.cs +++ b/Filtration/Services/UpdateService.cs @@ -1,5 +1,7 @@ using System; +using System.IO; using System.Linq; +using System.Reflection; using System.Text.RegularExpressions; using System.Threading.Tasks; using Filtration.Enums; @@ -117,6 +119,17 @@ namespace Filtration.Services _downloadPrereleaseUpdates = true; #endif + var expectedInstallationPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Filtration"); + var baseDirectory = AppDomain.CurrentDomain.BaseDirectory; + + var runningInstalled = baseDirectory.StartsWith(expectedInstallationPath); + + if (!runningInstalled) + { + Logger.Debug($"Skipping update check since base directory of {baseDirectory} does not start with the expected installation path of {expectedInstallationPath}"); + return; + } + async Task CheckForUpdatesAsync(IUpdateManager updateManager) { _updates = await updateManager.CheckForUpdate(progress: progress => UpdateProgressChanged?.Invoke(this, new UpdateProgressChangedEventArgs(progress))); diff --git a/Filtration/Views/ItemFilterBlockView.xaml b/Filtration/Views/ItemFilterBlockView.xaml index 02cadb6..5b84db6 100644 --- a/Filtration/Views/ItemFilterBlockView.xaml +++ b/Filtration/Views/ItemFilterBlockView.xaml @@ -158,7 +158,7 @@ Visibility="{Binding HasPositionalSound, Converter={StaticResource BooleanVisibilityConverter}}" Background="Transparent" BorderBrush="Transparent" - ToolTip="Click to preview drop sound"> + ToolTip="Click to preview positional drop sound">