Developer Area

Show
Ignore:
Timestamp:
01/28/11 13:14:41 (3 years ago)
Author:
henri
Message:

Refactored handling of dynamic generation of localized service types, LIH and keywords.
All are now done in the background and won't impact the loading of the controllers.
They are handled by a new singleton class called CurrentAccount?. They are cached per account

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • apps/iphone/my.tel/trunk/Classes/ProfileRecordsViewController.m

    r793 r794  
    99#import "ProfileRecordsViewController.h" 
    1010#import "ProfileRecordCell.h" 
     11#import "CurrentAccount.h" 
    1112 
    1213#define kNINFOMaxLength 255             // NINFO max length 
     
    423424#endif 
    424425         
     426        CurrentAccount *currentAccount = [CurrentAccount sharedInstance]; 
    425427        NSMutableDictionary *uiItem; 
    426428        if (!jsonItem) { 
     
    474476        if ([jsonItem objectForKey:@"terminal"] && [[jsonItem objectForKey:@"terminal"] integerValue] == 0) { //nonterminal 
    475477                [uiItem setValue:@"0" forKey:@"terminal"]; 
    476                 [uiItem setObject:[self.skeysDict objectForKey:@"ntn"] forKey:@"service"]; 
     478                [uiItem setObject:[currentAccount localizedNameForService:@"ntn"] forKey:@"service"]; 
    477479                [uiItem setObject:(NSString *)[[ProfileRecordsViewController imageMappings] objectForKey:@"ntn"] forKey:@"imageName"]; 
    478480                return uiItem; 
     
    502504                                [sPart appendString:@" & "]; 
    503505                        } 
    504                         if ([self.skeysDict objectForKey:anS]) { 
    505                                 [sPart appendString:[self.skeysDict objectForKey:anS]]; 
    506                         } else { 
    507                                 [sPart appendString:anS]; 
    508                         } 
     506                        [sPart appendString:[currentAccount localizedNameForService:anS]]; 
    509507                } 
    510508        } 
     
    515513                                [liPart appendString:@" & "]; 
    516514                        NSString *anLI = (NSString *)[[jsonItem objectForKey:@"locations"] objectAtIndex:i]; 
    517                         [liPart appendString:[self.liDict objectForKey:anLI]]; 
     515                        [liPart appendString:[currentAccount localizedNameForLocation:anLI]]; 
    518516                        if ([anLI isEqualToString:@"x-mobile"] && couldbeMobilePhone) { 
    519517                                [uiItem setObject:[[ProfileRecordsViewController imageMappings] objectForKey:@"mobile"] forKey:@"imageName"]; 
Telnic
Search This Site
Partners
Neustar
ICANN
Main site | WHOIS | Sell .tel | FAQ | Archived Site | About Telnic | Contact Us