- (void) beginUpdate;
- (BOOL) updating;
- (void) distUpgrade;
+- (void) loadData;
- (void) updateData;
- (void) syncData;
- (void) showSettings;
}
- (void) save {
- NSString *role = nil;
+ NSString *role(nil);
switch ([segment_ selectedSegmentIndex]) {
case 0: role = @"User"; break;
}
if (![role isEqualToString:Role_]) {
+ bool rolling(Role_ == nil);
Role_ = role;
Settings_ = [NSMutableDictionary dictionaryWithObjectsAndKeys:
Changed_ = true;
- [roledelegate_ updateData];
+ if (rolling)
+ [roledelegate_ loadData];
+ else
+ [roledelegate_ updateData];
}
}
- (UCViewController *) _pageForURL:(NSURL *)url withClass:(Class)_class;
- (void) setPage:(UCViewController *)page;
+- (void) loadData;
@end
}
- (void) _reloadData {
- UIView *block();
-
UIProgressHUD *hud([self addProgressHUD]);
[hud setText:(loaded_ ? UCLocalize("RELOADING_DATA") : UCLocalize("LOADING_DATA"))];
return;
}
- if (Role_ == nil)
- [self showSettings];
-
_trace();
NSMutableArray *items([NSMutableArray arrayWithObjects:
[container_ setTabBarController:tabbar_];
[window_ addSubview:[container_ view]];
+ [self performSelector:@selector(loadData) withObject:nil afterDelay:0];
+}
+
+- (void) loadData {
+ if (Role_ == nil) {
+ [self showSettings];
+ return;
+ }
+
[UIKeyboard initImplementationNow];
[self reloadData];