Ver código fonte

Merge branch 'develop_PDFReaderProNew_v4.7.0_AppStroe' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProNew_v4.7.0_AppStroe

tangchao 1 dia atrás
pai
commit
8b2eb43543

+ 1 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateConvertViewController.xib

@@ -121,7 +121,7 @@
                                                 </textField>
                                                 <button translatesAutoresizingMaskIntoConstraints="NO" id="gJ6-Oq-0D6">
                                                     <rect key="frame" x="0.0" y="0.0" width="300" height="34"/>
-                                                    <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="VTO-RV-7fb">
+                                                    <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="VTO-RV-7fb">
                                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                         <font key="font" metaFont="system"/>
                                                     </buttonCell>

+ 1 - 1
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.swift

@@ -1484,7 +1484,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
                     if(status.uppercased() == "COMPLETED") {
                         KMUserInfoVCModel().refreshUserInfo { success, msg,dic  in
                             DispatchQueue.main.async {
-                                NotificationCenter.default.post(name: NSNotification.Name.KMIAPSubscriptionLoaded, object: nil)
+                                NotificationCenter.default.post(name: NSNotification.Name.KMMemberInfoChange, object: self)
                             }
                         }
                         

+ 16 - 0
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -143,6 +143,8 @@ NSPopoverDelegate>
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(expandPersonalCenterNotification:) name:@"ExpandPersonalCenter" object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(closeMenu:) name:@"CloseMenuNotification" object:nil];
     
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(memberInfoChangeNotification:) name:KMMemberInfoChangeNotification object:nil];
+
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(subscriptionLoadedNotification:) name:KMIAPSubscriptionLoadedNotification object:nil];
 }
 
@@ -621,11 +623,19 @@ NSPopoverDelegate>
 }
 
 - (IBAction)officeButtonAction:(id)sender {
+#if VERSION_FREE
 #if VERSION_DMG
     DMGEmbeddedOldWC *embeddedWC = [DMGEmbeddedOldWC currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
     [embeddedWC showWindow:nil];
     [embeddedWC.window center];
 #endif
+#else
+    [[KMProductCompareWC shared] setOrientation:YES];
+    [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypePro_Base];
+    [[KMProductCompareWC shared] showWindow:nil];
+
+#endif
+
 }
 
 - (NSAttributedString *)numberConvertColor:(NSColor*)color String:(NSString *)string {
@@ -786,6 +796,12 @@ NSPopoverDelegate>
         [self reloadData];
     });
 }
+- (void)memberInfoChangeNotification:(NSNotification *)noti {
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [self reloadData];
+    });
+}
+
 
 - (void)popOverCloseAction {
     if (self.stopPopOverHide == NO) {

+ 1 - 0
PDF Office/PDF Master/Class/Purchase/IAPProductsManager.h

@@ -14,6 +14,7 @@ extern NSString * const KMIAPProductPurchasedNotification;
 extern NSString * const KMIAPProductRestoreFailedNotification;
 extern NSString * const KMIAPProductRestoreFinishedNotification;
 extern NSString * const KMIAPSubscriptionLoadedNotification;
+extern NSString * const KMMemberInfoChangeNotification;
 
 extern NSString * const KMStandardAnnualSubscriptionCodeKey_DMG; // "productName": "PDF Reader Pro Standard - Annual Plan"
 extern NSString * const KMAdvancedAnnualSubscriptionCodeKey_DMG; //"productName": "PDF Reader Pro Advanced - Annual Plan"

+ 1 - 0
PDF Office/PDF Master/Class/Purchase/IAPProductsManager.m

@@ -71,6 +71,7 @@ NSString * const KMIAPProductPurchasedNotification = @"KMIAPProductPurchasedNoti
 NSString * const KMIAPProductRestoreFailedNotification = @"KMIAPProductRestoreFailedNotification";
 NSString * const KMIAPProductRestoreFinishedNotification = @"KMIAPProductRestoreFinishedNotification";
 NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoadedNotification";
+NSString * const KMMemberInfoChangeNotification = @"KMMemberInfoChangeNotification";
 
 @interface IAPProduct ()
 

+ 3 - 0
PDF Office/PDF Master/MemberCenter/WindowsController/KMMemberPromptWC.swift

@@ -17,6 +17,7 @@ import Cocoa
 
 }
 
+@objcMembers
 class KMMemberPromptWC: NSWindowController {
     
     @IBOutlet weak var titleLabel: NSTextField!
@@ -136,6 +137,8 @@ class KMMemberPromptWC: NSWindowController {
         } else if tipType == .unsubscribe {
         } else if tipType == .signout {
             self.window?.close()
+        } else if tipType == .signouting {
+            self.window?.close()
         }
     }
     

+ 5 - 1
PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

@@ -1209,10 +1209,14 @@ class KMProductCompareWC: NSWindowController {
             guard let self = self else { return }
             if KMMemberInfo.shared.isLogin {
                 self.model.appStoreEquityVerification(notification) { success, msg in
-                    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1.5) {//购买成功后,会员信息没有及时刷新
+                    DispatchQueue.main.async {
                         if success {
 //                            self.showAlert(message: NSLocalizedString("Binding Interest Success!", comment: ""))
+                            
                             KMUserInfoVCModel().refreshUserInfo { success, msg,dic  in
+                                if(success) {
+                                    NotificationCenter.default.post(name: NSNotification.Name.KMMemberInfoChange, object: self)
+                                }
                             }
                             self.window?.close()
                         } else {