@@ -133,30 +133,37 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
133
133
// Configure the cell...
134
134
cell.textLabel .text = [[TSApplicationsManager sharedInstance ] displayNameForAppPath: appPath];
135
135
cell.detailTextLabel .text = [NSString stringWithFormat: @" %@ • %@ " , appVersion, appId];
136
- cell.imageView .layer .borderWidth = 0.2 ;
137
- cell.imageView .layer .borderColor = [UIColor blackColor ].CGColor ;
136
+ cell.imageView .layer .borderWidth = 0.34 ;
137
+ cell.imageView .layer .borderColor = [UIColor separatorColor ].CGColor ;
138
138
cell.imageView .layer .cornerRadius = 13.8 ;
139
139
140
- UIImage* cachedIcon = _cachedIcons[appId];
141
- if (cachedIcon)
140
+ if (appId)
142
141
{
143
- cell.imageView .image = cachedIcon;
142
+ UIImage* cachedIcon = _cachedIcons[appId];
143
+ if (cachedIcon)
144
+ {
145
+ cell.imageView .image = cachedIcon;
146
+ }
147
+ else
148
+ {
149
+ cell.imageView .image = _placeholderIcon;
150
+ dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^
151
+ {
152
+ // usleep(1000 * 5000); // (test delay for debugging)
153
+ UIImage* iconImage = [UIImage _applicationIconImageForBundleIdentifier: appId format: 10 scale: [UIScreen mainScreen ].scale];
154
+ _cachedIcons[appId] = iconImage;
155
+ dispatch_async (dispatch_get_main_queue (), ^{
156
+ if ([tableView.indexPathsForVisibleRows containsObject: indexPath])
157
+ {
158
+ cell.imageView .image = iconImage;
159
+ }
160
+ });
161
+ });
162
+ }
144
163
}
145
164
else
146
165
{
147
166
cell.imageView .image = _placeholderIcon;
148
- dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^
149
- {
150
- // usleep(1000 * 5000); // (test delay for debugging)
151
- UIImage* iconImage = [UIImage _applicationIconImageForBundleIdentifier: appId format: 10 scale: [UIScreen mainScreen ].scale];
152
- _cachedIcons[appId] = iconImage;
153
- dispatch_async (dispatch_get_main_queue (), ^{
154
- if ([tableView.indexPathsForVisibleRows containsObject: indexPath])
155
- {
156
- cell.imageView .image = iconImage;
157
- }
158
- });
159
- });
160
167
}
161
168
162
169
cell.preservesSuperviewLayoutMargins = NO ;
@@ -186,7 +193,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
186
193
NSString * appId = [appsManager appIdForAppPath: appPath];
187
194
NSString * appName = [appsManager displayNameForAppPath: appPath];
188
195
189
- UIAlertController* appSelectAlert = [UIAlertController alertControllerWithTitle: appName message: appId preferredStyle: UIAlertControllerStyleActionSheet];
196
+ UIAlertController* appSelectAlert = [UIAlertController alertControllerWithTitle: appName message: appId?: @" " preferredStyle: UIAlertControllerStyleActionSheet];
190
197
191
198
/* UIAlertAction* detachAction = [UIAlertAction actionWithTitle:@"Detach from TrollStore" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action)
192
199
{
0 commit comments