diff options
-rw-r--r-- | MobileCydia.mm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 6999f0a..dd645d9 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]; } |