- (void) removeProgressHUD:(UIProgressHUD *)hud;
- (CYViewController *) pageForPackage:(NSString *)name;
- (void) showActionSheet:(UIActionSheet *)sheet fromItem:(UIBarButtonItem *)item;
+- (void) reloadDataWithInvocation:(NSInvocation *)invocation;
@end
static id<CydiaDelegate> CydiaApp;
- (NSArray *) packages;
- (NSArray *) sources;
- (Source *) sourceWithKey:(NSString *)key;
-- (void) reloadData;
+- (void) reloadDataWithInvocation:(NSInvocation *)invocation;
- (void) configure;
- (bool) prepare;
return [self popErrorWithTitle:title] || !success;
}
-- (void) reloadData { CYPoolStart() {
+- (void) reloadDataWithInvocation:(NSInvocation *)invocation { CYPoolStart() {
@synchronized (self) {
++era_;
if (chk != -1)
close(chk);
+ if (invocation != nil)
+ [invocation invoke];
+
NSString *title(UCLocalize("DATABASE"));
_trace();
[NSThread detachNewThreadSelector:@selector(_refreshIfPossible) toTarget:self withObject:nil];
}
-- (void) _reloadData {
+- (void) _reloadDataWithInvocation:(NSInvocation *)invocation {
UIProgressHUD *hud(loaded_ ? [self addProgressHUD] : nil);
[hud setText:UCLocalize("RELOADING_DATA")];
- [database_ yieldToSelector:@selector(reloadData) withObject:nil];
+ [database_ yieldToSelector:@selector(reloadDataWithInvocation:) withObject:invocation];
if (hud != nil)
[self removeProgressHUD:hud];
];
}
-- (void) reloadData {
+- (void) reloadDataWithInvocation:(NSInvocation *)invocation {
@synchronized (self) {
- [self _reloadData];
+ [self _reloadDataWithInvocation:invocation];
}
}
+- (void) reloadData {
+ [self reloadDataWithInvocation:nil];
+}
+
- (void) resolve {
pkgProblemResolver *resolver = [database_ resolver];
- (void) complete {
@synchronized (self) {
- [self _reloadData];
+ [self _reloadDataWithInvocation:nil];
}
}