|
@@ -59,8 +59,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
|
|
|
override func viewDidLoad() {
|
|
|
super.viewDidLoad()
|
|
|
DispatchQueue.main.async { [self] in
|
|
|
- while !Utils.getFinishInitPrefsr() || HTTPCookieStorage.shared.cookies?.count == 0 {
|
|
|
- //print("WAITING PREFS DONE")
|
|
|
+ while !Utils.getFinishInitPrefsr() {
|
|
|
+
|
|
|
}
|
|
|
startView()
|
|
|
}
|
|
@@ -412,35 +412,39 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
|
|
|
if iPhoneModel == "iPhone X or newer" {
|
|
|
minYIpX += 20
|
|
|
}
|
|
|
- ViewController.chatButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: 45, height: 45))
|
|
|
+ var widthHeightButton: CGFloat = 45
|
|
|
+ if Utils.getIconDockSize() == "1" {
|
|
|
+ widthHeightButton = 55
|
|
|
+ }
|
|
|
+ ViewController.chatButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: widthHeightButton, height: widthHeightButton))
|
|
|
ViewController.chatButton.setBackgroundImage(UIImage(named: "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
|
|
|
ViewController.chatButton.layer.shadowColor = UIColor.black.cgColor
|
|
|
ViewController.chatButton.layer.shadowOpacity = 0.1
|
|
|
ViewController.chatButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
|
ViewController.chatButton.addTarget(self, action: #selector(chatTap), for: .touchUpInside)
|
|
|
|
|
|
- ViewController.callButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: 45, height: 45))
|
|
|
+ ViewController.callButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: widthHeightButton, height: widthHeightButton))
|
|
|
ViewController.callButton.setBackgroundImage(UIImage(named: "pb_button_call", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
|
|
|
ViewController.callButton.layer.shadowColor = UIColor.black.cgColor
|
|
|
ViewController.callButton.layer.shadowOpacity = 0.1
|
|
|
ViewController.callButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
|
ViewController.callButton.addTarget(self, action: #selector(callTap), for: .touchUpInside)
|
|
|
|
|
|
- ViewController.ccButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: 45, height: 45))
|
|
|
+ ViewController.ccButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: widthHeightButton, height: widthHeightButton))
|
|
|
ViewController.ccButton.setBackgroundImage(UIImage(named: "pb_button_cc", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
|
|
|
ViewController.ccButton.layer.shadowColor = UIColor.black.cgColor
|
|
|
ViewController.ccButton.layer.shadowOpacity = 0.1
|
|
|
ViewController.ccButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
|
ViewController.ccButton.addTarget(self, action: #selector(ccTap), for: .touchUpInside)
|
|
|
|
|
|
- ViewController.streamingButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: 45, height: 45))
|
|
|
+ ViewController.streamingButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: widthHeightButton, height: widthHeightButton))
|
|
|
ViewController.streamingButton.setBackgroundImage(UIImage(named: "pb_button_stream", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
|
|
|
ViewController.streamingButton.layer.shadowColor = UIColor.black.cgColor
|
|
|
ViewController.streamingButton.layer.shadowOpacity = 0.1
|
|
|
ViewController.streamingButton.layer.shadowOffset = CGSize(width: 4, height: 4)
|
|
|
ViewController.streamingButton.addTarget(self, action: #selector(streamTap), for: .touchUpInside)
|
|
|
|
|
|
- ViewController.postButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: 45, height: 45))
|
|
|
+ ViewController.postButton = UIButton(frame: CGRect(x: self.view.bounds.width / 2 - 22.5 , y: self.view.bounds.height - 80 - minYIpX, width: widthHeightButton, height: widthHeightButton))
|
|
|
ViewController.postButton.setBackgroundImage(UIImage(named: "pb_button_post", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!.withRenderingMode(.alwaysOriginal), for: .normal)
|
|
|
ViewController.postButton.layer.shadowColor = UIColor.black.cgColor
|
|
|
ViewController.postButton.layer.shadowOpacity = 0.1
|
|
@@ -1056,7 +1060,6 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
|
|
|
if Utils.getIsLoadThemeFromOther() {
|
|
|
customIcons = Utils.getButtonIcon().components(separatedBy: ",")
|
|
|
}
|
|
|
- print("UHUYY \(customButtons.count) <> \(customIcons.count) <> \(customIcons)")
|
|
|
for i in 0..<customButtons.count {
|
|
|
let package_id = customButtons[i]
|
|
|
let app_id = ""
|