Skip to content

Why is canCheckForUpdates enabled while sessionInProgress? #2703

Answered by zorgiepoo
pilotmoon asked this question in Q&A
Discussion options

You must be logged in to vote

It's supposed to be so that if there is UI available to be shown, checking for updates will bring that UI to frontmost focus. Imagine if the update alert window is behind other windows in the app the user is using for example, or if the user driver decided to defer showing the UI immediately.

if (_showingPermissionRequest || _driver.showingUpdate) {
        if ([_userDriver respondsToSelector:@selector(showUpdateInFocus)]) {
            [_userDriver showUpdateInFocus];
        }
        return;
    }

And there are also cases where canCheckForUpdates should be NO while sessionInProgress is YES, like when downloads/update checks are happening in the background automatically, and Sparkle isn…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pilotmoon
Comment options

@zorgiepoo
Comment options

Answer selected by pilotmoon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants