Browse Source

Update VersionUpdateHandler.swift

master
Abhishek Banthia 9 months ago
parent
commit
76035dc5cc
  1. 4
      Clocker/Overall App/VersionUpdateHandler.swift

4
Clocker/Overall App/VersionUpdateHandler.swift

@ -447,7 +447,7 @@ class VersionUpdateHandler: NSObject {
@objc private func downloadVersionsData() { @objc private func downloadVersionsData() {
if onlyPromptIfMainWindowIsAvailable, NSApplication.shared.mainWindow == nil { if onlyPromptIfMainWindowIsAvailable, NSApplication.shared.mainWindow == nil {
Logger.info("Main window not available in downloadVersionsData") Logger.info("Main window not available in downloadVersionsData")
remoteRepeater = Repeater(interval: .seconds(0.5), mode: .once) { _ in remoteRepeater = Repeater(interval: .seconds(5), mode: .once) { _ in
OperationQueue.main.addOperation { [weak self] in OperationQueue.main.addOperation { [weak self] in
guard let self = self else { guard let self = self else {
return return
@ -498,7 +498,7 @@ class VersionUpdateHandler: NSObject {
private func checkIfNewVersion() { private func checkIfNewVersion() {
if onlyPromptIfMainWindowIsAvailable, NSApplication.shared.mainWindow == nil { if onlyPromptIfMainWindowIsAvailable, NSApplication.shared.mainWindow == nil {
Logger.info("Main window not available in checkIfNewVersion") Logger.info("Main window not available in checkIfNewVersion")
localRepeater = Repeater(interval: .seconds(0.5), mode: .once) { _ in localRepeater = Repeater(interval: .seconds(5), mode: .once) { _ in
OperationQueue.main.addOperation { [weak self] in OperationQueue.main.addOperation { [weak self] in
guard let self = self else { guard let self = self else {
return return

Loading…
Cancel
Save