[NSThread detachNewThreadSelector:@selector(_refreshIfPossible:) toTarget:self withObject:[Metadata_ objectForKey:@"LastUpdate"]];
}
-- (void) _reloadDataWithInvocation:(NSInvocation *)invocation {
+- (void) reloadDataWithInvocation:(NSInvocation *)invocation {
+@synchronized (self) {
UIProgressHUD *hud(loaded_ ? [self addProgressHUD] : nil);
[hud setText:UCLocalize("RELOADING_DATA")];
[self _updateData];
[self refreshIfPossible];
-}
+} }
- (void) updateData {
[self _updateData];
[database_ update];
}
-- (void) complete {
- @synchronized (self) {
- [self _reloadDataWithInvocation:nil];
- }
-}
-
- (void) disemulate {
if (emulated_ == nil)
return;
[self performSelectorOnMainThread:@selector(repairWithInvocation:) withObject:[NSInvocation invocationWithSelector:selector forTarget:database_] waitUntilDone:YES];
}
+- (void) reloadData {
+ [self reloadDataWithInvocation:nil];
+}
+
- (void) syncData {
[self _saveConfig];
[self detachNewProgressSelector:@selector(update_) toTarget:self forController:nil title:@"UPDATING_SOURCES"];
- [self complete];
+ [self reloadData];
}
- (void) addTrivialSource:(NSString *)href {
Changed_ = true;
}
-- (void) reloadDataWithInvocation:(NSInvocation *)invocation {
- @synchronized (self) {
- [self _reloadDataWithInvocation:invocation];
- }
-}
-
-- (void) reloadData {
- [self reloadDataWithInvocation:nil];
-}
-
- (void) resolve {
pkgProblemResolver *resolver = [database_ resolver];
++locked_;
[self detachNewProgressSelector:@selector(perform) toTarget:database_ forController:navigation title:@"RUNNING"];
--locked_;
- [self complete];
+ [self reloadData];
}
- (void) showSettings {