mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge pull request #1447 from ychin/whats-new-show-prerelease
Allow showing pre-release in What's New page
This commit is contained in:
@@ -504,8 +504,8 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
NSArray<NSString*> *currentVersionItems = [currentVersion componentsSeparatedByString:@"."];
|
||||
// Compare two arrays lexographically. We just assume that version
|
||||
// numbers are also X.Y.Z… with no "beta" etc texts.
|
||||
bool currentVersionLarger = NO;
|
||||
for (int i = 0; i < currentVersionItems.count && i < lastUsedVersionItems.count; i++) {
|
||||
BOOL currentVersionLarger = NO;
|
||||
for (int i = 0; i < currentVersionItems.count || i < lastUsedVersionItems.count; i++) {
|
||||
if (i >= currentVersionItems.count) {
|
||||
currentVersionLarger = NO;
|
||||
break;
|
||||
@@ -527,18 +527,14 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
if (currentVersionLarger) {
|
||||
[ud setValue:currentVersion forKey:MMLastUsedBundleVersionKey];
|
||||
|
||||
// We have successfully updated to a new version. Show a "What's
|
||||
// New" page to the user with latest release notes if the main
|
||||
// release number has increased (we don't count the pre-release
|
||||
// minor revision number for now).
|
||||
if (lastUsedVersionItems[0].integerValue < currentVersionItems[0].integerValue) {
|
||||
// We have successfully updated to a new version. Show a
|
||||
// "What's New" page to the user with latest release notes
|
||||
// unless they configured not to.
|
||||
BOOL showWhatsNewSetting = [ud boolForKey:MMShowWhatsNewOnStartupKey];
|
||||
|
||||
BOOL showWhatsNewSetting = [ud boolForKey:MMShowWhatsNewOnStartupKey];
|
||||
|
||||
shouldShowWhatsNewPage = showWhatsNewSetting;
|
||||
[MMWhatsNewController setRequestVersionRange:lastUsedVersion
|
||||
to:currentVersion];
|
||||
}
|
||||
shouldShowWhatsNewPage = showWhatsNewSetting;
|
||||
[MMWhatsNewController setRequestVersionRange:lastUsedVersion
|
||||
to:currentVersion];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +83,7 @@ static NSString *_latestVersion;
|
||||
_latestVersion];
|
||||
}
|
||||
else {
|
||||
// We just updated to a new version. Show a message to user and also
|
||||
// requests specifically these new versions for the welcome message
|
||||
// Just show the current version MacVim has
|
||||
NSString *currentVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
|
||||
|
||||
whatsNewURLStr = [NSString stringWithFormat:@"%@?version=%@",
|
||||
|
||||
Reference in New Issue
Block a user