From ea0e9eb1e63a99a059f22d4e78ea38f8744404fb Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Sun, 7 Nov 2010 00:53:00 -0700 Subject: [PATCH 1/1] Use external status API to get the status. But internally. --- MobileCydia.mm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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]; } -- 2.45.2