Skip to content

new fragment#1

Open
Michax94 wants to merge 2 commits intomasterfrom
codereview
Open

new fragment#1
Michax94 wants to merge 2 commits intomasterfrom
codereview

Conversation

@Michax94
Copy link
Owner

No description provided.

@@ -8,6 +8,7 @@ interface MainContract {

interface Router : BaseContract.Router{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacja

import pl.skipcode.basekotlinapp.feature.commons.BaseContract

interface AboutContract {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wywalilbym te puste linie


@Provides
fun providePresenter(
fragment: AboutFragment,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tutaj bym dał view: AboutContract.View

))
}

override fun openAbout() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mozesz zrobic override fun openAbout() = router.goToAboutFragment(), ladniej wyglada

presenter.logoutUser()
}

override fun clickUsername() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wywaliłbym te jednolinijkowe metody clickLogout() clickUsername() itd i po prostu w onClicku wywolywalbym presenter.costam(), to prawdopodobnie zrobiles na potrzeby testow, ale imho to nadmiarowe i zaciemnia kod

}

override fun goToAboutFragment() {
activity.pushFragment(AboutFragment(), BaseActivity.ANIM.FADE_IN)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w jednej linijce bym to robił override fun goToAboutFragment() = activity.pushFragment(....)

fun showMessage(message: Int)
fun clickLogout()
fun clickUsername()
fun updateUsernameUI(username: String)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tą metodę bym nazwał setUsernameText(username: String), bo tylko to ona robi i ta nazwa bardziej pasi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants