From fa7c4a9bfbab35bd3ca7275ba2b27ecfec543773 Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Mon, 12 Mar 2018 21:08:11 +0200 Subject: [PATCH] Adjusted forced thumbnail refresh check logic --- Eve-O-Preview/Services/Implementation/ThumbnailManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs b/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs index abecbb1..2d44d66 100644 --- a/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs +++ b/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs @@ -15,7 +15,7 @@ namespace EveOPreview.Services private const int WindowPositionThresholdLow = -10_000; private const int WindowPositionThresholdHigh = 31_000; private const int WindowSizeThreshold = 10; - private const int ForcedRefreshCycleThreshold = 1; + private const int ForcedRefreshCycleThreshold = 2; private const string DefaultClientTitle = "EVE"; #endregion @@ -115,15 +115,16 @@ namespace EveOPreview.Services bool hideAllThumbnails = this._configuration.HideThumbnailsOnLostFocus && !(string.IsNullOrEmpty(foregroundWindowTitle) || this.IsClientWindowActive(foregroundWindowHandle)); + this._refreshCycleCount++; + bool forceRefresh; - if (this._refreshCycleCount > ThumbnailManager.ForcedRefreshCycleThreshold) + if (this._refreshCycleCount >= ThumbnailManager.ForcedRefreshCycleThreshold) { this._refreshCycleCount = 0; forceRefresh = true; } else { - this._refreshCycleCount++; forceRefresh = false; }