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