Skip to content
This repository was archived by the owner on Jun 27, 2020. It is now read-only.

Conversation

@bogdan-evtushenko
Copy link
Collaborator

No description provided.

Copy link
Owner

@yev-kanivets yev-kanivets left a comment

Choose a reason for hiding this comment

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

Fast as a 🚀Few improvements and can me shipped.


private lateinit var shortSummaryPresenter: ShortSummaryPresenter

override fun getContentViewId(): Int {
Copy link
Owner

Choose a reason for hiding this comment

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

Can be simplified to override fun getContentViewId() = R.layout.activity_report.


initSpinnerCurrency()

shortSummaryPresenter = ShortSummaryPresenter(this)
Copy link
Owner

Choose a reason for hiding this comment

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

Probably can be moved to the place, where it's declared.

val reportMaker = ReportMaker(rateController)
val report = reportMaker.getRecordReport(currency, period, recordList)

var adapter: ExpandableListReportAdapter? = null
Copy link
Owner

Choose a reason for hiding this comment

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

All code below can be moved into if statement.

private fun initSpinnerCurrency() {
val currencyList = currencyController.readAll()

spinnerCurrency.adapter = ArrayAdapter(this,
Copy link
Owner

Choose a reason for hiding this comment

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

Strange line-break.

update(spinnerCurrency.selectedItem.toString())
}

override fun onNothingSelected(p0: AdapterView<*>?) {
Copy link
Owner

Choose a reason for hiding this comment

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

Can be one-lined.


<android.support.v7.widget.AppCompatSpinner
android:id="@+id/spinner_currency"
android:id="@+id/spinnerCurrency"
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@bogdan-evtushenko bogdan-evtushenko merged commit 3c50871 into dev Aug 28, 2019
@yev-kanivets yev-kanivets deleted the 178_kotlinify_reportActivity branch August 28, 2019 13:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants