Skip to main content

on_event

Function on_event 

Source
pub fn on_event(f: impl Fn(&UpdateEvent) + 'static)
Expand description

Calls f with what the updater does: found an update, up to date, ready to install on quit, failed. Sparkle shows its own windows for checks the user starts; this is for the app’s own status (a badge, a line in Settings) and for checks.

If the app’s bundle is set up for updates but Sparkle couldn’t start (a missing key, a framework that won’t load), f hears that first, as UpdateEvent::Failed.