Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify users about iOS 12 and 13 drop. #6024

Merged
merged 3 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@ class HomeViewControllerWithBannerWrapperViewController: UIViewController, MXKVi
override func viewDidLoad() {
super.viewDidLoad()

homeViewController.willMove(toParent: self)

view.backgroundColor = .clear

stackView = UIStackView()
stackView.axis = .vertical
stackView.distribution = .fill
stackView.alignment = .fill

view.vc_addSubViewMatchingParent(stackView)
view.vc_addSubViewMatchingParentSafeArea(stackView)

addChild(homeViewController)
stackView.addArrangedSubview(homeViewController.view)
Expand Down
6 changes: 3 additions & 3 deletions Riot/Modules/Home/VersionCheck/VersionCheckCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import Foundation

class VersionCheckCoordinator: Coordinator, VersionCheckBannerViewDelegate, VersionCheckAlertViewControllerDelegate {
private enum Constants {
static let osVersionToBeDropped = 11
static let hasOSVersionBeenDropped = true
static let osVersionToBeDropped = 13
static let hasOSVersionBeenDropped = false
static let supportURL = URL(string: "https://support.apple.com/en-gb/guide/iphone/iph3e504502/ios")
}

Expand Down Expand Up @@ -52,7 +52,7 @@ class VersionCheckCoordinator: Coordinator, VersionCheckBannerViewDelegate, Vers
func start() {
let majorOSVersion = ProcessInfo().operatingSystemVersion.majorVersion

guard majorOSVersion < Constants.osVersionToBeDropped else {
guard majorOSVersion <= Constants.osVersionToBeDropped else {
return
}

Expand Down
23 changes: 10 additions & 13 deletions Riot/Modules/TabBar/TabBarCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -315,19 +315,6 @@ final class TabBarCoordinator: NSObject, TabBarCoordinatorType {

viewControllers.append(homeViewController)

if let existingVersionCheckCoordinator = self.versionCheckCoordinator {
self.remove(childCoordinator: existingVersionCheckCoordinator)
}

if let masterTabBarController = self.masterTabBarController {

let versionCheckCoordinator = self.createVersionCheckCoordinator(withRootViewController: masterTabBarController, bannerPresentrer: homeViewController)
versionCheckCoordinator.start()
self.add(childCoordinator: versionCheckCoordinator)

self.versionCheckCoordinator = versionCheckCoordinator
}

if RiotSettings.shared.homeScreenShowFavouritesTab {
let favouritesViewController = self.createFavouritesViewController()
viewControllers.append(favouritesViewController)
Expand All @@ -349,6 +336,16 @@ final class TabBarCoordinator: NSObject, TabBarCoordinatorType {
}

tabBarController.updateViewControllers(viewControllers)

if let existingVersionCheckCoordinator = self.versionCheckCoordinator {
self.remove(childCoordinator: existingVersionCheckCoordinator)
}

let versionCheckCoordinator = self.createVersionCheckCoordinator(withRootViewController: tabBarController, bannerPresentrer: homeViewController)
versionCheckCoordinator.start()
self.add(childCoordinator: versionCheckCoordinator)

self.versionCheckCoordinator = versionCheckCoordinator
}

// MARK: Navigation
Expand Down
1 change: 1 addition & 0 deletions changelog.d/pr-6024.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Warn users about incoming iOS 12 and 13 support drop.