diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d10eca..3dd7ea9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to PSExchangeClock will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- The **Refresh** button did nothing: it called an undefined `$scraperPath` left over from before the module restructure. It now calls `Get-StockExchangeData -ForceRefresh` + ## [1.1.0] - 2026-09-28 ### Fixed diff --git a/PSExchangeClock/Public/New-StockExchangeCountdownDashboard.ps1 b/PSExchangeClock/Public/New-StockExchangeCountdownDashboard.ps1 index 8c48fcb..28cf6a0 100644 --- a/PSExchangeClock/Public/New-StockExchangeCountdownDashboard.ps1 +++ b/PSExchangeClock/Public/New-StockExchangeCountdownDashboard.ps1 @@ -4957,12 +4957,10 @@ public static class CredManager { $btnRefresh.Add_Click({ $txtStatus.Text = 'Refreshing exchange data...' try { - if (Test-Path $scraperPath) { - $refreshed = & $scraperPath -ForceRefresh - if ($refreshed) { - $txtStatus.Text = "Refreshed $($refreshed.Count) exchanges" - $txtLastUpdated.Text = "Last updated: $([DateTime]::Now.ToString('yyyy-MM-dd HH:mm:ss'))" - } + $refreshed = @(Get-StockExchangeData -ForceRefresh) + if ($refreshed.Count -gt 0) { + $txtStatus.Text = "Refreshed $($refreshed.Count) exchanges" + $txtLastUpdated.Text = "Last updated: $([DateTime]::Now.ToString('yyyy-MM-dd HH:mm:ss'))" } } catch {