@@ -504,8 +504,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification
504504 NSArray <NSString *> *currentVersionItems = [currentVersion componentsSeparatedByString: @" ." ];
505505 // Compare two arrays lexographically. We just assume that version
506506 // numbers are also X.Y.Z… with no "beta" etc texts.
507- bool currentVersionLarger = NO ;
508- for (int i = 0 ; i < currentVersionItems.count && i < lastUsedVersionItems.count ; i++) {
507+ BOOL currentVersionLarger = NO ;
508+ for (int i = 0 ; i < currentVersionItems.count || i < lastUsedVersionItems.count ; i++) {
509509 if (i >= currentVersionItems.count ) {
510510 currentVersionLarger = NO ;
511511 break ;
@@ -527,18 +527,14 @@ - (void)applicationDidFinishLaunching:(NSNotification *)notification
527527 if (currentVersionLarger) {
528528 [ud setValue: currentVersion forKey: MMLastUsedBundleVersionKey];
529529
530- // We have successfully updated to a new version. Show a "What's
531- // New" page to the user with latest release notes if the main
532- // release number has increased (we don't count the pre-release
533- // minor revision number for now).
534- if (lastUsedVersionItems[0 ].integerValue < currentVersionItems[0 ].integerValue ) {
530+ // We have successfully updated to a new version. Show a
531+ // "What's New" page to the user with latest release notes
532+ // unless they configured not to.
533+ BOOL showWhatsNewSetting = [ud boolForKey: MMShowWhatsNewOnStartupKey];
535534
536- BOOL showWhatsNewSetting = [ud boolForKey: MMShowWhatsNewOnStartupKey];
537-
538- shouldShowWhatsNewPage = showWhatsNewSetting;
539- [MMWhatsNewController setRequestVersionRange: lastUsedVersion
540- to: currentVersion];
541- }
535+ shouldShowWhatsNewPage = showWhatsNewSetting;
536+ [MMWhatsNewController setRequestVersionRange: lastUsedVersion
537+ to: currentVersion];
542538 }
543539 }
544540 }
0 commit comments