Ver código fonte

Add Inquiry and fix bugs

alqindiirsyam 2 anos atrás
pai
commit
7c2c94fd73

+ 3 - 2
appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -256,7 +256,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 var bgChoosen = ""
                 let arrayBg = listBg.split(separator: ",")
                 bgChoosen = String(arrayBg[Int.random(in: 0..<arrayBg.count)])
-                ViewController.getDataImageFromUrl(from: URL(string: PrefsUtil.getURLBase()! + "/dashboardv2/uploads/background/" + bgChoosen)!) { data, response, error in
+                ViewController.getDataImageFromUrl(from: URL(string: PrefsUtil.getURLBase() + "/dashboardv2/uploads/background/" + bgChoosen)!) { data, response, error in
                     guard let data = data, error == nil else { return }
                     // always update the UI from the main thread
                     DispatchQueue.main.async() { [self] in
@@ -331,7 +331,8 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 let accessoryButton = UIButton(type: .custom)
                 accessoryButton.setTitle(UIApplication.appVersion, for: .normal)
                 accessoryButton.setTitleColor(.black, for: .normal)
-                accessoryButton.frame = CGRect(x: 0, y: 0, width: 40, height: 40)
+                accessoryButton.contentHorizontalAlignment = .right;
+                accessoryButton.frame = CGRect(x: 0, y: 0, width: 100, height: 40)
                 accessoryButton.contentMode = .scaleAspectFit
                 cell.accessoryView = accessoryButton as UIView
             case "Vibrate Mode".localized():

+ 21 - 5
appbuilder-ios/AppBuilder/AppBuilder/ThirdTabViewController.swift

@@ -74,19 +74,19 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         }
         switch(ViewController.tab3){
         case "0":
-            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab1-main-only?f_pin=\(me ?? "")&lang=\(intLang)"
+            address = "\(PrefsUtil.getURLBase())nexilis/pages/tab1-main-only?f_pin=\(me ?? "")&lang=\(intLang)"
             myURL = URL(string: address)
         case "1":
-            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab3-main-only?f_pin=\(me ?? "")&lang=\(intLang)"
+            address = "\(PrefsUtil.getURLBase())nexilis/pages/tab3-main-only?f_pin=\(me ?? "")&lang=\(intLang)"
             myURL = URL(string: address)
         case "2":
-            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab1-main?f_pin=\(me ?? "")&lang=\(intLang)"
+            address = "\(PrefsUtil.getURLBase())nexilis/pages/tab1-main?f_pin=\(me ?? "")&lang=\(intLang)"
             myURL = URL(string: address)
         case "3":
-            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab3-commerce?f_pin=\(me ?? "")&lang=\(intLang)"
+            address = "\(PrefsUtil.getURLBase())nexilis/pages/tab3-commerce?f_pin=\(me ?? "")&lang=\(intLang)"
             myURL = URL(string: address)
         case "4":
-            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab1-video?f_pin=\(me ?? "")&lang=\(intLang)"
+            address = "\(PrefsUtil.getURLBase())nexilis/pages/tab1-video?f_pin=\(me ?? "")&lang=\(intLang)"
             myURL = URL(string: address)
         default:
             if(!ViewController.tab3.isEmpty){
@@ -165,6 +165,14 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
                 }
                 ViewController.removeMiddleButton()
             }
+        } else if PrefsUtil.getCpaasMode() != PrefsUtil.CPAAS_MODE_DOCKED {
+            DispatchQueue.main.async {
+                if let viewController = viewController as? ViewController {
+                    if !viewController.tabBar.isHidden {
+                        viewController.tabBar.isHidden = true
+                    }
+                }
+            }
         }
     }
 
@@ -182,6 +190,14 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
                 viewController.tabBar.isHidden = false
                 ViewController.middleButton.isHidden = false
             }
+        } else if PrefsUtil.getCpaasMode() != PrefsUtil.CPAAS_MODE_DOCKED {
+            DispatchQueue.main.async {
+                if let viewController = viewController as? ViewController {
+                    if viewController.tabBar.isHidden {
+                        viewController.tabBar.isHidden = false
+                    }
+                }
+            }
         }
     }