Remove redundant main actor dispatch
This commit is contained in:
parent
97bfdabe0c
commit
f50d48dc4e
|
@ -88,7 +88,7 @@ class MainTabBarController: UITabBarController {
|
|||
}
|
||||
|
||||
@MainActor
|
||||
func viewController(context: AppContext, authContext: AuthContext?, coordinator: SceneCoordinator) async -> UIViewController {
|
||||
func viewController(context: AppContext, authContext: AuthContext?, coordinator: SceneCoordinator) -> UIViewController {
|
||||
guard let authContext = authContext else {
|
||||
return UITableViewController()
|
||||
}
|
||||
|
@ -171,12 +171,11 @@ extension MainTabBarController {
|
|||
view.backgroundColor = .systemBackground
|
||||
|
||||
// seealso: `ThemeService.apply(theme:)`
|
||||
Task { @MainActor in
|
||||
let tabs = Tab.allCases
|
||||
var viewControllers = [UIViewController]()
|
||||
|
||||
for tab in tabs {
|
||||
let viewController = await tab.viewController(context: context, authContext: authContext, coordinator: coordinator)
|
||||
let viewController = tab.viewController(context: context, authContext: authContext, coordinator: coordinator)
|
||||
viewController.tabBarItem.tag = tab.tag
|
||||
viewController.tabBarItem.title = tab.title // needs for acessiblity large content label
|
||||
viewController.tabBarItem.image = tab.image.imageWithoutBaseline()
|
||||
|
@ -316,7 +315,6 @@ extension MainTabBarController {
|
|||
|
||||
updateTabBarDisplay()
|
||||
}
|
||||
}
|
||||
|
||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
super.traitCollectionDidChange(previousTraitCollection)
|
||||
|
|
Loading…
Reference in New Issue