Commit 8d0eada9 authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Update StubFragment.

parent 7ad14ecd
......@@ -2,7 +2,6 @@ package ru.terrakok.gitlabclient.ui.global
import android.os.Bundle
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.extension.argument
import ru.terrakok.gitlabclient.model.system.flow.FlowRouter
import toothpick.Toothpick
import javax.inject.Inject
......@@ -13,26 +12,15 @@ import javax.inject.Inject
class StubFragment : BaseFragment() {
override val layoutRes = R.layout.fragment_stub
private val scopeName: String by argument(ARG_SCOPE)
@Inject
lateinit var router: FlowRouter
override fun onCreate(savedInstanceState: Bundle?) {
Toothpick.inject(this, Toothpick.openScope(scopeName))
Toothpick.inject(this, scope)
super.onCreate(savedInstanceState)
}
override fun onBackPressed() {
router.exit()
}
companion object {
private const val ARG_SCOPE = "arg_scope"
fun create(scope: String) = StubFragment().apply {
arguments = Bundle().apply {
putString(ARG_SCOPE, scope)
}
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment