Fix bugs. Show version in settings. Update icons. Update version.
[pithos-ios] / Classes / AccountSettingsViewController.m
index ce9752b..c793374 100755 (executable)
     [super viewDidLoad];
     self.navigationItem.title = @"API Account Info";
     userDetailsSection = 0;
-    if ([self.account.provider isGRNet])
-        getTokenSection = 1;
-    else
-        getTokenSection = -1;
+    getTokenSection = 1;
     
     /*if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
         UIView *backgroundContainer = [[UIView alloc] init];
 #pragma mark - Table view data source
 
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    if (getTokenSection > 0)
-        return 2;
-    else
-        return 1;
+    return 2;
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     } else {
         cell = (RSTextFieldCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
         if (cell == nil) {
-            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+            cell = [[[RSTextFieldCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
         }
         
         cell.textLabel.text = @"Get Token";
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     if (indexPath.section == getTokenSection) {
-        NSString *loginURL = [NSString stringWithFormat:@"%@?next=pithos://login", account.pithosLoginURLPrefix]; 
-        
+        NSString *loginURL = [NSString stringWithFormat:@"%@?next=pithos://login&force=", account.pithosLoginURLPrefix];         
         [[UIApplication sharedApplication] openURL:[NSURL URLWithString:loginURL]];
         [tableView deselectRowAtIndexPath:indexPath animated:NO];
     }