@@ -15,28 +15,20 @@ protocol RouteMapProtocol {
1515
1616struct RouteMap : RouteMapProtocol {
1717
18- // MARK: - [TabBar]
19-
20- static var tabBarScreen : DestinationStep < PDATabBarController , Any ? > {
21- StepAssembly (
22- finder: ClassFinder ( ) , // В чем разница с <PDATabBarController, Any?>(options: .current, startingPoint: .root)?
23- factory: CompleteFactoryAssembly ( factory: PDATabBarControllerFactory < PDATabBarController , Any ? > ( ) )
24- . with ( createNewsWithNavigationFactory ( ) , using: PDATabBarController . add ( ) )
25- . with ( createForumWithNavigationFactory ( ) , using: PDATabBarController . add ( ) )
26- . with ( createMenuWithNavigationFactory ( ) , using: PDATabBarController . add ( ) )
27- . assemble ( ) )
28- . using ( GeneralAction . replaceRoot ( ) )
29- . from ( GeneralStep . root ( ) )
30- . assemble ( )
31- }
32-
3318 // MARK: - [News]
3419
3520 static var newsScreen : DestinationStep < NewsVC , Any ? > {
3621 StepAssembly (
37- finder: ClassFinder < NewsVC , Any ? > ( ) ,
38- factory: NilFactory ( ) )
39- . from ( tabBarScreen)
22+ finder: ClassFinder ( ) ,
23+ factory: NewsFactory ( )
24+ )
25+ . using ( PDANavigationController . push ( ) )
26+ . from ( SingleContainerStep (
27+ finder: NilFinder ( ) ,
28+ factory: NavigationControllerFactory < PDANavigationController , Any ? > ( ) )
29+ )
30+ . using ( GeneralAction . replaceRoot ( ) )
31+ . from ( GeneralStep . root ( ) )
4032 . assemble ( )
4133 }
4234
@@ -51,22 +43,14 @@ struct RouteMap: RouteMapProtocol {
5143 . assemble ( )
5244 }
5345
54- // MARK: - [Forum]
55-
56- static var forumScreen : DestinationStep < ForumVC , Any ? > {
57- StepAssembly ( finder: ClassFinder < ForumVC , Any ? > ( ) ,
58- factory: NilFactory ( ) )
59- . from ( tabBarScreen)
60- . assemble ( )
61- }
62-
6346 // MARK: - [Menu]
6447
6548 static var menuScreen : DestinationStep < MenuVC , Any ? > {
6649 StepAssembly (
67- finder: ClassFinder < MenuVC , Any ? > ( ) ,
68- factory: NilFactory ( ) )
69- . from ( tabBarScreen)
50+ finder: ClassFinder ( ) ,
51+ factory: MenuFactory ( ) )
52+ . using ( UINavigationController . push ( ) )
53+ . from ( newsScreen. expectingContainer ( ) )
7054 . assemble ( )
7155 }
7256
@@ -79,7 +63,6 @@ struct RouteMap: RouteMapProtocol {
7963 . adding ( LoginInterceptor ( ) )
8064 . using ( UINavigationController . push ( ) )
8165 . from ( menuScreen. expectingContainer ( ) )
82- // .from(GeneralStep.custom(using: ClassFinder<UINavigationController, Any?>()))
8366 . assemble ( )
8467 }
8568
@@ -115,29 +98,3 @@ struct LoginConfiguration {
11598// .assemble()
11699// }
117100}
118-
119- // MARK: - NavCon Factories
120-
121- extension RouteMap {
122-
123- static func createNewsWithNavigationFactory( ) -> CompleteFactory < NavigationControllerFactory < UINavigationController , Any ? > > {
124- return CompleteFactoryAssembly (
125- factory: NavigationControllerFactory ( ) )
126- . with ( NewsFactory ( ) , using: UINavigationController . pushAsRoot ( ) )
127- . assemble ( )
128- }
129-
130- static func createForumWithNavigationFactory( ) -> CompleteFactory < NavigationControllerFactory < UINavigationController , Any ? > > {
131- return CompleteFactoryAssembly (
132- factory: NavigationControllerFactory ( ) )
133- . with ( ForumFactory ( ) , using: UINavigationController . pushAsRoot ( ) )
134- . assemble ( )
135- }
136-
137- static func createMenuWithNavigationFactory( ) -> CompleteFactory < NavigationControllerFactory < UINavigationController , Any ? > > {
138- return CompleteFactoryAssembly (
139- factory: NavigationControllerFactory ( ) )
140- . with ( MenuFactory ( ) , using: UINavigationController . pushAsRoot ( ) )
141- . assemble ( )
142- }
143- }
0 commit comments