|
@@ -351,7 +351,7 @@ NSPopoverDelegate>
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
|
|
KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
|
|
-
|
|
|
|
|
|
+ BOOL buttonHiddenFlag = false;
|
|
if (type == KMUserScenarioTypeLite_type1 ||
|
|
if (type == KMUserScenarioTypeLite_type1 ||
|
|
type == KMUserScenarioTypeLite_type3 ||
|
|
type == KMUserScenarioTypeLite_type3 ||
|
|
type == KMUserScenarioTypeLite_type5 ||
|
|
type == KMUserScenarioTypeLite_type5 ||
|
|
@@ -365,7 +365,16 @@ NSPopoverDelegate>
|
|
#if !VERSION_DMG
|
|
#if !VERSION_DMG
|
|
if(KMMemberInfo.shared.isLogin == NO) {
|
|
if(KMMemberInfo.shared.isLogin == NO) {
|
|
#if VERSION_FREE
|
|
#if VERSION_FREE
|
|
- self.button.title = [self _getAppStoreFreeVersionBuyNowTitle];
|
|
|
|
|
|
+ if (IAPProductsManager.defaultManager.isAvailableAllFunction) {
|
|
|
|
+ if (IAPProductsManager.defaultManager.isAvailableAdvancedPDFToOffice) {
|
|
|
|
+ self.button.title = @"";
|
|
|
|
+ buttonHiddenFlag = true;
|
|
|
|
+ } else {
|
|
|
|
+ self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade", nil)];
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ self.button.title = [self _getAppStoreFreeVersionBuyNowTitle];
|
|
|
|
+ }
|
|
#else
|
|
#else
|
|
self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade", nil)];
|
|
self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade", nil)];
|
|
#endif
|
|
#endif
|
|
@@ -472,6 +481,15 @@ NSPopoverDelegate>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if VERSION_FREE
|
|
|
|
+#if !VERSION_DMG
|
|
|
|
+ if (buttonHiddenFlag) {
|
|
|
|
+ self.bgImg.hidden = YES;
|
|
|
|
+ self.button.hidden = YES;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
|
|
+
|
|
buttonWidth = CGRectGetWidth(self.button.frame);
|
|
buttonWidth = CGRectGetWidth(self.button.frame);
|
|
NSRect btnRect = [self.button.attributedTitle boundingRectWithSize:CGSizeMake(MAXFLOAT, CGRectGetHeight(self.button.frame)) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading];
|
|
NSRect btnRect = [self.button.attributedTitle boundingRectWithSize:CGSizeMake(MAXFLOAT, CGRectGetHeight(self.button.frame)) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading];
|
|
// if (fabs(buttonWidth-btnRect.size.width)>50) {
|
|
// if (fabs(buttonWidth-btnRect.size.width)>50) {
|
|
@@ -764,6 +782,13 @@ NSPopoverDelegate>
|
|
- (void)IAPPurchaseSuccess:(NSNotification *)notification {
|
|
- (void)IAPPurchaseSuccess:(NSNotification *)notification {
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
[self reloadData];
|
|
[self reloadData];
|
|
|
|
+
|
|
|
|
+#if VERSION_FREE
|
|
|
|
+#if VERSION_DMG
|
|
|
|
+#else
|
|
|
|
+ [[KMProductCompareWC shared] closeAction];
|
|
|
|
+#endif
|
|
|
|
+#endif
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|