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.

Great work 👍Code can be improved in few places, but very good overall.

val recordReportConverter = RecordReportConverter(report)
adapter = ExpandableListReportAdapter(this, recordReportConverter)
for (categoryRecord in report.summary) {

This comment was marked as resolved.

if (report != null) {
val recordReportConverter = RecordReportConverter(report)
adapter = ExpandableListReportAdapter(this, recordReportConverter)
for (categoryRecord in report.summary) {

This comment was marked as resolved.

if (position == 0) showReport()
else editRecord(position)
recordAdapter = RecordAdapter(this, listOf(), true)
recordAdapter.setOnItemClickListener { position -> editRecord(position) }

This comment was marked as resolved.

recordAdapter.setOnItemClickListener { position -> editRecord(position) }

summaryPresenter = ShortSummaryPresenter(this)
val summaryView = summaryPresenter.create(true) {

This comment was marked as resolved.

btnAddIncome.setOnClickListener { addIncome() }
}

private fun editRecord(position: Int) {

This comment was marked as resolved.

@bogdan-evtushenko bogdan-evtushenko self-assigned this Sep 6, 2019

private fun editRecord(position: Int) {
AnswersProxy.get().logButton("Edit Record")
// -1 because SummaryView
Copy link
Owner

Choose a reason for hiding this comment

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

This is exactly why comments are bad ⬆️

btnAddIncome.setOnClickListener { addIncome() }
}

private fun getPositionWithoutSummary(position: Int): 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 one-lined?

@bogdan-evtushenko bogdan-evtushenko merged commit 3973eb9 into dev Sep 9, 2019
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