From: Grant Paul Date: Sun, 7 Nov 2010 07:53:00 +0000 (-0700) Subject: Use external status API to get the status. But internally. X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/ea0e9eb1e63a99a059f22d4e78ea38f8744404fb?ds=inline Use external status API to get the status. But internally. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 6999f0aa..dd645d9f 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8439,9 +8439,16 @@ static _finline void _setHomePage(Cydia *self) { } - (void) applicationSuspend:(__GSEvent *)event { - // FIXME: This needs to be fixed, but we no longer have a progress_. - // What's the best solution? - if (hud_ == nil)// && ![progress_ isRunning]) + // Use external process status API internally. + // This is probably a really bad idea. + uint64_t status = 0; + int notify_token; + if (notify_register_check("com.saurik.Cydia.status", ¬ify_token) == NOTIFY_STATUS_OK) { + notify_get_state(notify_token, &status); + notify_cancel(notify_token); + } + + if (hud_ == nil && status == 0) [super applicationSuspend:event]; }