Remove duplicated logout code and fix spinner.

- Remove some duplication of logout behaviour
- Fix additional spinner on homeViewController
This commit is contained in:
David Langley
2022-01-10 21:38:24 +00:00
parent 72bcae9d15
commit b779eccfce
9 changed files with 74 additions and 46 deletions

View File

@@ -16,8 +16,8 @@
import Foundation
class HomeViewControllerWithBannerWrapperViewController: MXKActivityHandlingViewController, BannerPresentationProtocol {
class HomeViewControllerWithBannerWrapperViewController: UIViewController, MXKViewControllerActivityHandling, BannerPresentationProtocol {
@objc let homeViewController: HomeViewController
private var bannerContainerView: UIView!
private var stackView: UIStackView!
@@ -85,4 +85,22 @@ class HomeViewControllerWithBannerWrapperViewController: MXKActivityHandlingView
bannerView.removeFromSuperview()
}
}
// MARK: - MXKViewControllerActivityHandling
var activityIndicator: UIActivityIndicatorView! {
get {
return homeViewController.activityIndicator
}
set {
homeViewController.activityIndicator = newValue
}
}
func startActivityIndicator() {
homeViewController.startActivityIndicator()
}
func stopActivityIndicator() {
homeViewController.stopActivityIndicator()
}
}