소스 검색

Update disclaimer notification

kevin 5 달 전
부모
커밋
51db813601
2개의 변경된 파일10개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 0
      AppBuilder/AppBuilder/FirstTabViewController.swift
  2. 7 6
      AppBuilder/AppBuilder/ViewController.swift

+ 3 - 0
AppBuilder/AppBuilder/FirstTabViewController.swift

@@ -105,6 +105,7 @@ class FirstTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         
         NotificationCenter.default.addObserver(self, selector: #selector(onShowAC(notification:)), name: NSNotification.Name(rawValue: "onShowAC"), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(onRefreshWebView(notification:)), name: NSNotification.Name(rawValue: "onRefreshWebView"), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(onRefreshWebView(notification:)), name: UIApplication.willEnterForegroundNotification, object: nil)
         FirstTabViewController.canLoadURL = true
         processURL()
     }
@@ -191,6 +192,7 @@ class FirstTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
     }
     
     override func viewWillAppear(_ animated: Bool) {
+        FirstTabViewController.forceRefresh = true
         if FirstTabViewController.canLoadURL {
             processURL()
         }
@@ -239,6 +241,7 @@ class FirstTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
     
     @objc func onRefreshWebView(notification: NSNotification) {
         FirstTabViewController.forceRefresh = true
+        processURL()
     }
     
     override func viewWillDisappear(_ animated: Bool) {

+ 7 - 6
AppBuilder/AppBuilder/ViewController.swift

@@ -48,6 +48,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
     var termVC: UIViewController?
     let welcomeDesc = UILabel()
     let termText = "Read our Terms of Service. Tap \"Agree and Continue\" to accept Terms of Service.".localized()
+    let notifDisclaim = "Enabling notifications ensures you receive important updates, alerts, and reminders from our app. By turning on notifications, you agree to receive push notifications related to app features, promotions, and relevant updates.".localized()
     let term = "Terms of Service.".localized()
     var firstLoad = true
     let privacyWV = WKWebView()
@@ -797,7 +798,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             containerButton.addSubview(titleAgree)
             titleAgree.anchor(left: imageAgree.rightAnchor, right: containerButton.rightAnchor, paddingLeft: 5, centerY: containerButton.centerYAnchor)
             
-            let formattedText = String.format(strings: [term], inString: termText, color: self.traitCollection.userInterfaceStyle == .dark ? UIColor.white: UIColor.black)
+            let formattedText = String.format(strings: [term], inString: "\(termText)\n\n\(notifDisclaim)", color: self.traitCollection.userInterfaceStyle == .dark ? UIColor.white: UIColor.black)
             welcomeDesc.isUserInteractionEnabled = true
             welcomeDesc.attributedText = formattedText
             welcomeDesc.numberOfLines = 0
@@ -1107,15 +1108,15 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                                 let urlString = PrefsUtil.getURLBase() + "get_file_from_path?img=\(icon)"
                                 if let cachedImage = ImageCache.shared.image(forKey: urlString) {
                                     if i == 0 {
-                                        ViewController.chatButton.setBackgroundImage(cachedImage, for: .normal)
+//                                        ViewController.chatButton.setBackgroundImage(cachedImage, for: .normal)
                                     } else if i == 1 {
-                                        ViewController.callButton.setBackgroundImage(cachedImage, for: .normal)
+//                                        ViewController.callButton.setBackgroundImage(cachedImage, for: .normal)
                                     }  else if i == 2 {
-                                        ViewController.ccButton.setBackgroundImage(cachedImage, for: .normal)
+//                                        ViewController.ccButton.setBackgroundImage(cachedImage, for: .normal)
                                     }  else if i == 3 {
-                                        ViewController.postButton.setBackgroundImage(cachedImage, for: .normal)
+//                                        ViewController.postButton.setBackgroundImage(cachedImage, for: .normal)
                                     }  else if i == 4 {
-                                        ViewController.streamingButton.setBackgroundImage(cachedImage, for: .normal)
+//                                        ViewController.streamingButton.setBackgroundImage(cachedImage, for: .normal)
                                     }
                                     return
                                 }