Commit 7e6d529d authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Rename root fragments.

parent b5146857
......@@ -12,11 +12,11 @@ import ru.terrakok.gitlabclient.ui.auth.AuthFragment
import ru.terrakok.gitlabclient.ui.drawer.DrawerFlowFragment
import ru.terrakok.gitlabclient.ui.global.FlowFactory
import ru.terrakok.gitlabclient.ui.global.StubFragment
import ru.terrakok.gitlabclient.ui.issue.IssueFragment
import ru.terrakok.gitlabclient.ui.issue.MainIssueFragment
import ru.terrakok.gitlabclient.ui.issue.IssueInfoFragment
import ru.terrakok.gitlabclient.ui.issue.IssueNotesFragment
import ru.terrakok.gitlabclient.ui.libraries.LibrariesFragment
import ru.terrakok.gitlabclient.ui.main.MainFlowFragment
import ru.terrakok.gitlabclient.ui.main.MainFragment
import ru.terrakok.gitlabclient.ui.mergerequest.*
import ru.terrakok.gitlabclient.ui.my.activity.MyEventsFragment
import ru.terrakok.gitlabclient.ui.my.issues.MyIssuesContainerFragment
......@@ -26,7 +26,7 @@ import ru.terrakok.gitlabclient.ui.my.mergerequests.MyMergeRequestsFragment
import ru.terrakok.gitlabclient.ui.my.todos.MyTodosContainerFragment
import ru.terrakok.gitlabclient.ui.my.todos.MyTodosFragment
import ru.terrakok.gitlabclient.ui.privacypolicy.PrivacyPolicyFragment
import ru.terrakok.gitlabclient.ui.project.ProjectFragment
import ru.terrakok.gitlabclient.ui.project.MainProjectFragment
import ru.terrakok.gitlabclient.ui.project.files.ProjectFilesFragment
import ru.terrakok.gitlabclient.ui.project.info.ProjectEventsFragment
import ru.terrakok.gitlabclient.ui.project.info.ProjectInfoContainerFragment
......@@ -50,8 +50,8 @@ object Screens {
override fun getFragment() = DrawerFlowFragment()
}
object MainFlow : SupportAppScreen() {
override fun getFragment() = MainFlowFragment()
object Main : SupportAppScreen() {
override fun getFragment() = MainFragment()
}
object MyEvents : SupportAppScreen() {
......@@ -122,8 +122,8 @@ object Screens {
override fun getFragment() = FlowFactory.createProjectFlowFragment(projectId)
}
object ProjectMainFlow : SupportAppScreen() {
override fun getFragment() = ProjectFragment()
object MainProject : SupportAppScreen() {
override fun getFragment() = MainProjectFragment()
}
object ProjectInfoContainer : SupportAppScreen() {
......@@ -193,8 +193,8 @@ object Screens {
override fun getFragment() = FlowFactory.createMergeRequestFlowFragment(projectId, mrId)
}
object MergeRequest : SupportAppScreen() {
override fun getFragment() = MergeRequestFragment()
object MainMergeRequest : SupportAppScreen() {
override fun getFragment() = MainMergeRequestFragment()
}
object MergeRequestInfo : SupportAppScreen() {
......@@ -220,8 +220,8 @@ object Screens {
override fun getFragment() = FlowFactory.createIssueFlowFragment(projectId, issueId)
}
object Issue : SupportAppScreen() {
override fun getFragment() = IssueFragment()
object MainIssue : SupportAppScreen() {
override fun getFragment() = MainIssueFragment()
}
object IssueInfo : SupportAppScreen() {
......
......@@ -43,7 +43,7 @@ class NavigationDrawerPresenter @Inject constructor(
menuController.close()
if (item != currentSelectedItem) {
when (item) {
ACTIVITY -> router.newRootScreen(Screens.MainFlow)
ACTIVITY -> router.newRootScreen(Screens.Main)
PROJECTS -> router.newRootScreen(Screens.ProjectsContainer)
ABOUT -> router.newRootScreen(Screens.About)
}
......
......@@ -48,7 +48,7 @@ class AppActivity : MvpAppCompatActivity() {
nextFragment: Fragment?,
fragmentTransaction: FragmentTransaction
) {
//fix incorrect order lifecycle callback of MainFlowFragment
//fix incorrect order lifecycle callback of MainFragment
fragmentTransaction.setReorderingAllowed(true)
}
}
......
......@@ -20,7 +20,7 @@ import ru.terrakok.gitlabclient.presentation.drawer.NavigationDrawerView
import ru.terrakok.gitlabclient.presentation.global.GlobalMenuController
import ru.terrakok.gitlabclient.ui.about.AboutFragment
import ru.terrakok.gitlabclient.ui.global.BaseFragment
import ru.terrakok.gitlabclient.ui.main.MainFlowFragment
import ru.terrakok.gitlabclient.ui.main.MainFragment
import ru.terrakok.gitlabclient.ui.projects.ProjectsContainerFragment
import toothpick.Scope
import toothpick.Toothpick
......@@ -71,7 +71,7 @@ class DrawerFlowFragment : BaseFragment() {
nextFragment: Fragment?,
fragmentTransaction: FragmentTransaction
) {
//fix incorrect order lifecycle callback of MainFlowFragment
//fix incorrect order lifecycle callback of MainFragment
fragmentTransaction.setReorderingAllowed(true)
}
}
......@@ -87,7 +87,7 @@ class DrawerFlowFragment : BaseFragment() {
.replace(R.id.navDrawerContainer, NavigationDrawerFragment())
.commitNow()
navigator.setLaunchScreen(Screens.MainFlow)
navigator.setLaunchScreen(Screens.Main)
} else {
updateNavDrawer()
}
......@@ -117,7 +117,7 @@ class DrawerFlowFragment : BaseFragment() {
drawerFragment?.let { drawerFragment ->
currentFragment?.let {
when (it) {
is MainFlowFragment -> drawerFragment.onScreenChanged(NavigationDrawerView.MenuItem.ACTIVITY)
is MainFragment -> drawerFragment.onScreenChanged(NavigationDrawerView.MenuItem.ACTIVITY)
is ProjectsContainerFragment -> drawerFragment.onScreenChanged(NavigationDrawerView.MenuItem.PROJECTS)
is AboutFragment -> drawerFragment.onScreenChanged(NavigationDrawerView.MenuItem.ABOUT)
}
......
......@@ -99,8 +99,8 @@ object FlowFactory {
when (arguments.getSerializable(ARG_TYPE) as Type) {
Type.AUTH -> Screens.Auth
Type.USER -> Screens.UserInfo
Type.ISSUE -> Screens.Issue
Type.MERGE_REQUEST -> Screens.MergeRequest
Type.PROJECT -> Screens.ProjectMainFlow
Type.ISSUE -> Screens.MainIssue
Type.MERGE_REQUEST -> Screens.MainMergeRequest
Type.PROJECT -> Screens.MainProject
}
}
\ No newline at end of file
......@@ -49,7 +49,7 @@ class FlowFragment : BaseFragment() {
nextFragment: Fragment?,
fragmentTransaction: FragmentTransaction
) {
//fix incorrect order lifecycle callback of MainFlowFragment
//fix incorrect order lifecycle callback of MainFragment
fragmentTransaction.setReorderingAllowed(true)
}
}
......
......@@ -4,7 +4,7 @@ import android.os.Bundle
import android.support.v4.app.FragmentPagerAdapter
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_mr.*
import kotlinx.android.synthetic.main.fragment_main_mr.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.Screens
import ru.terrakok.gitlabclient.extension.showSnackMessage
......@@ -15,9 +15,9 @@ import ru.terrakok.gitlabclient.ui.global.BaseFragment
/**
* Created by Konstantin Tskhovrebov (aka @terrakok) on 14.02.18.
*/
class IssueFragment : BaseFragment(), IssueView {
class MainIssueFragment : BaseFragment(), IssueView {
override val layoutRes = R.layout.fragment_issue
override val layoutRes = R.layout.fragment_main_issue
@InjectPresenter
lateinit var presenter: IssuePresenter
......
......@@ -12,7 +12,7 @@ import ru.terrakok.gitlabclient.ui.global.BaseFragment
/**
* @author Konstantin Tskhovrebov (aka terrakok). Date: 02.04.17
*/
class MainFlowFragment : BaseFragment() {
class MainFragment : BaseFragment() {
override val layoutRes = R.layout.fragment_main
private val currentTabFragment: BaseFragment?
......
......@@ -4,7 +4,7 @@ import android.os.Bundle
import android.support.v4.app.FragmentPagerAdapter
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import kotlinx.android.synthetic.main.fragment_mr.*
import kotlinx.android.synthetic.main.fragment_main_mr.*
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.Screens
import ru.terrakok.gitlabclient.extension.showSnackMessage
......@@ -15,9 +15,9 @@ import ru.terrakok.gitlabclient.ui.global.BaseFragment
/**
* Created by Konstantin Tskhovrebov (aka @terrakok) on 14.02.18.
*/
class MergeRequestFragment : BaseFragment(), MergeRequestView {
class MainMergeRequestFragment : BaseFragment(), MergeRequestView {
override val layoutRes = R.layout.fragment_mr
override val layoutRes = R.layout.fragment_main_mr
@InjectPresenter
lateinit var presenter: MergeRequestPresenter
......
......@@ -4,7 +4,7 @@ import android.os.Bundle
import com.arellomobile.mvp.presenter.InjectPresenter
import com.arellomobile.mvp.presenter.ProvidePresenter
import com.aurelhubert.ahbottomnavigation.AHBottomNavigationAdapter
import kotlinx.android.synthetic.main.fragment_project.*
import kotlinx.android.synthetic.main.fragment_main_project.*
import ru.terrakok.cicerone.android.support.SupportAppScreen
import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.Screens
......@@ -18,9 +18,9 @@ import ru.terrakok.gitlabclient.ui.global.BaseFragment
/**
* Created by Eugene Shapovalov (@CraggyHaggy) on 10.02.18.
*/
class ProjectFragment : BaseFragment(), ProjectView {
class MainProjectFragment : BaseFragment(), ProjectView {
override val layoutRes: Int = R.layout.fragment_project
override val layoutRes: Int = R.layout.fragment_main_project
private val currentTabFragment: BaseFragment?
get() = childFragmentManager.fragments.firstOrNull { !it.isHidden } as? BaseFragment
......
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