Permalink
Browse files

Client bugfixes

  • Loading branch information...
1 parent 989fd07 commit 6b05a400fb4bac4c86b54e8c7233b00999ca74f1 @TheRealKerni TheRealKerni committed Dec 5, 2010
@@ -161,7 +161,7 @@ - (void) checkForBetaUpdate:(BWHockeyViewController *)hockeyViewController {
if (checkInProgress) return;
checkInProgress = YES;
-
+
currentHockeyViewController = hockeyViewController;
NSNumber *hockeyAutoUpdateSetting = [[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAutoUpdateSetting];
@@ -192,6 +192,9 @@ - (void) checkForBetaUpdate:(BWHockeyViewController *)hockeyViewController {
} else if ([hockeyAutoUpdateSetting intValue] == BETA_UPDATE_CHECK_MANUAL && currentHockeyViewController == nil) {
self.betaDictionary = [dictionaryOfLastHockeyCheck mutableCopy];
checkInProgress = NO;
+ if (currentHockeyViewController != nil) {
+ [currentHockeyViewController redrawTableView];
+ }
return;
} else if ([hockeyAutoUpdateSetting intValue] == BETA_UPDATE_CHECK_DAILY && currentHockeyViewController == nil) {
// is there an update available but not installed yet? shall we remind?
@@ -202,6 +205,9 @@ - (void) checkForBetaUpdate:(BWHockeyViewController *)hockeyViewController {
self.betaDictionary = [dictionaryOfLastHockeyCheck mutableCopy];
checkInProgress = NO;
+ if (currentHockeyViewController != nil) {
+ [currentHockeyViewController redrawTableView];
+ }
return;
}
@@ -240,10 +246,15 @@ - (void) checkForBetaUpdate:(BWHockeyViewController *)hockeyViewController {
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
timeoutInterval:10.0];
self.urlConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
+
if (!urlConnection) {
checkInProgress = NO;
[self registerOnline];
}
+
+ if (currentHockeyViewController != nil) {
+ [currentHockeyViewController redrawTableView];
+ }
}
@@ -348,7 +359,7 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
if (feed == nil || [feed count] == 0) {
if (currentHockeyViewController != nil) {
- [currentHockeyViewController redrawTableView];
+ [currentHockeyViewController redrawTableView];
}
return;
}
@@ -411,7 +422,7 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection
[result compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] == NSOrderedSame)
) {
if (currentHockeyViewController != nil) {
- [currentHockeyViewController redrawTableView];
+ [currentHockeyViewController redrawTableView];
}
return;
}
@@ -223,7 +223,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
NSString *requiredIdentifier = BetaCell1Identifier;
NSInteger cellStyle = UITableViewCellStyleSubtitle;
- if (self.hockeyController.checkInProgress) {
+ if (self.hockeyController.checkInProgress &&
+ indexPath.section == 0 &&
+ indexPath.row == 0) {
cell = [tableView dequeueReusableCellWithIdentifier:BetaCell3Identifier];
if (cell == nil) {
@@ -295,8 +297,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
}
- } else if (indexPath.section == startIndexOfSettings - 1) {
-
+ } else if (indexPath.section == startIndexOfSettings - 1) {
if ([[self.hockeyController.betaDictionary objectForKey:BETA_UPDATE_VERSION] compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] == NSOrderedSame) {
cell.textLabel.text = NSLocalizedStringFromTable(@"HockeySectionAppSameVersionButton", @"Hockey", @"Same Version");
cell.textLabel.textColor = [UIColor grayColor];
@@ -369,9 +370,13 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
#pragma mark Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- int startIndexOfSettings = [self sectionIndexOfSettings];
-
[tableView deselectRowAtIndexPath:indexPath animated:YES];
+
+ if (self.hockeyController.checkInProgress) {
+ return;
+ }
+
+ int startIndexOfSettings = [self sectionIndexOfSettings];
NSString *url = nil;
@@ -398,10 +403,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
[[NSUserDefaults standardUserDefaults] synchronize];
[tableView reloadData];
} else if (indexPath.section == startIndexOfSettings - 1) {
- // install application button
- NSString *parameter = [NSString stringWithFormat:@"?type=%@&bundleidentifier=%@", BETA_DOWNLOAD_TYPE_APP, [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"]];
- NSString *temp = [NSString stringWithFormat:@"%@%@", self.hockeyController.betaCheckUrl, parameter];
- url = [NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", [temp URLEncodedString]];
+ if ([[self.hockeyController.betaDictionary objectForKey:BETA_UPDATE_VERSION] compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] != NSOrderedSame) {
+ // install application button
+ NSString *parameter = [NSString stringWithFormat:@"?type=%@&bundleidentifier=%@", BETA_DOWNLOAD_TYPE_APP, [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"]];
+ NSString *temp = [NSString stringWithFormat:@"%@%@", self.hockeyController.betaCheckUrl, parameter];
+ url = [NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", [temp URLEncodedString]];
+ }
} else if (indexPath.section == startIndexOfSettings - 2 && indexPath.row == 2) {
// release notes in a webview
@@ -37,16 +37,16 @@
"HockeySectionAppHeader" = "Application";
/* New Version */
-"HockeySectionAppNewVersion" = "New Version";
+"HockeySectionAppNewVersion" = "Latest Version";
/* Current Version */
-"HockeySectionAppCurrentVersion" = "Current Version";
+"HockeySectionAppCurrentVersion" = "Installed Version";
/* Release Notes */
"HockeySectionAppReleaseNotes" = "Release Notes";
-/* Same Version */
-"HockeySectionAppSameVersionButton" = "Same Version";
+/* No Update Available */
+"HockeySectionAppSameVersionButton" = "No Update Available";
/* Visit the beta website on your Mac or PC to update */
"HockeySectionAppWebsite" = "Visit the beta website on your Mac or PC to update";
@@ -55,10 +55,10 @@
"HockeySectionAppButton" = "Install Update";
-/* Check For Updates Section */
+/* Check for Update Section */
-/* Check For Updates */
-"HockeySectionCheckHeader" = "Check for Updates";
+/* Check for Update */
+"HockeySectionCheckHeader" = "Check for Update";
/* Checking... */
"HockeySectionCheckProgress" = "Checking...";
@@ -37,16 +37,16 @@
"HockeySectionAppHeader" = "Programm";
/* New Version */
-"HockeySectionAppNewVersion" = "Neue Version";
+"HockeySectionAppNewVersion" = "Neueste Version";
/* Current Version */
"HockeySectionAppCurrentVersion" = "Installierte Version";
/* Release Notes */
"HockeySectionAppReleaseNotes" = "Neuerungen";
-/* Same Version */
-"HockeySectionAppSameVersionButton" = "Identische Version";
+/* No Update Available */
+"HockeySectionAppSameVersionButton" = "Keine Aktualisierung verfügbar";
/* Visit the beta website on your Mac or PC to update */
"HockeySectionAppWebsite" = "Besuchen Sie die Beta Webseite auf ihrem Mac oder PC um die Aktualisierung durchzuführen.";
@@ -55,9 +55,9 @@
"HockeySectionAppButton" = "Installieren";
-/* Check For Updates Section */
+/* Check for Update Section */
-/* Check For Updates */
+/* Check for Update */
"HockeySectionCheckHeader" = "Nach Aktualisierung Prüfen";
/* Checking... */

0 comments on commit 6b05a40

Please sign in to comment.