FlowNavigationModule.kt 616 Bytes
Newer Older
1
package ru.terrakok.gitlabclient.di.module
2 3 4

import ru.terrakok.cicerone.Cicerone
import ru.terrakok.cicerone.NavigatorHolder
Konstantin Tskhovrebov's avatar
Konstantin Tskhovrebov committed
5
import ru.terrakok.cicerone.Router
6 7 8 9 10 11
import ru.terrakok.gitlabclient.model.system.flow.FlowRouter
import toothpick.config.Module

/**
 * Created by Konstantin Tskhovrebov (aka @terrakok) on 03.09.18.
 */
Konstantin Tskhovrebov's avatar
Konstantin Tskhovrebov committed
12
class FlowNavigationModule(globalRouter: Router) : Module() {
13 14 15 16 17 18
    init {
        val cicerone = Cicerone.create(FlowRouter(globalRouter))
        bind(FlowRouter::class.java).toInstance(cicerone.router)
        bind(NavigatorHolder::class.java).toInstance(cicerone.navigatorHolder)
    }
}