diff --git a/IVPNClient/Scenes/MainScreen/MainViewController.swift b/IVPNClient/Scenes/MainScreen/MainViewController.swift index ef79093e7..096097fd2 100644 --- a/IVPNClient/Scenes/MainScreen/MainViewController.swift +++ b/IVPNClient/Scenes/MainScreen/MainViewController.swift @@ -82,6 +82,9 @@ class MainViewController: UIViewController { refreshUI() initConnectionInfo() startPingService() + DispatchQueue.async { [self] in + showFloatingPanel() + } } deinit { @@ -202,6 +205,10 @@ class MainViewController: UIViewController { // MARK: - Private methods - @objc private func updateFloatingPanelLayout() { + guard floatingPanel != nil else { + return + } + floatingPanel.invalidateLayout() mainView.setupView(animated: false) } @@ -240,6 +247,10 @@ class MainViewController: UIViewController { floatingPanel.behavior = MainFloatingPanelBehavior() } + private func showFloatingPanel() { + floatingPanel.show(animated: true) + } + private func startAPIUpdate() { updateServersList() Timer.scheduledTimer(timeInterval: 60 * 15, target: self, selector: #selector(updateServersList), userInfo: nil, repeats: true)