Skip to content

Commit c693cad

Browse files
committed
Fixed a bug with the stock check timer.
1 parent 4340679 commit c693cad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

macOS/iStockcheck/AppDelegate.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
4444
stockChecker.setSearchTerms(models: selectedModels)
4545
stockChecker.setSearchTerms(stores: selectedStores)
4646

47-
let timer = Timer(timeInterval: stockCheckFrequencySeconds, target: self, selector: #selector(checkForStockAndNotify), userInfo: nil, repeats: true)
48-
timer.fire()
47+
Timer.scheduledTimer(timeInterval: stockCheckFrequencySeconds, target: self, selector: #selector(checkForStockAndNotify), userInfo: nil, repeats: true)
4948
}
5049

5150
func checkForStockAndNotify() {

0 commit comments

Comments
 (0)