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.

Good in general 👍Can be improved in few places, check comments :)

companion object {

private const val KEY_ACCOUNT = "key_account"
private const val EMPTY_DATE = "empty_date"

This comment was marked as resolved.


companion object {
private const val REQUEST_ACTION_RECORD = 6
private const val EMPTY_DATE = "empty_date"

This comment was marked as resolved.

return countHeadersItems
}

private fun updateRecordAdapterDataList() {
Copy link
Owner

Choose a reason for hiding this comment

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

Duplicated code.

viewHolder.tvTitle.text = record.title
viewHolder.tvCategory.text = record.category?.name
viewHolder.tvCurrency.text = record.currency
if (rvViewHolder is RecordViewHolder) {

This comment was marked as resolved.


@SuppressLint("SimpleDateFormat")
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
private static final SimpleDateFormat dateInNumberFormat = new SimpleDateFormat("yyyy-MM-dd");

This comment was marked as resolved.

<item name="android:textColor">@color/text_black</item>
</style>

<style name="Text_Heading">

This comment was marked as resolved.


override fun initViews(view: View) {
recyclerView.adapter = RecordAdapter(requireContext(), getRecords(), false, null)
recyclerView.adapter = RecordAdapter(requireContext(), getRecordAdapterDataList(), false, null)
Copy link
Owner

Choose a reason for hiding this comment

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

getRecordItems will be more appropriate, I believe :)

fillDefaultAccount()
}

private fun getCountHeadersItems(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.

Smart, but I would take one more look on the places where we use getCountHeadersItems. Probably we can get a record without this magic :)

private var summaryPresenter: ShortSummaryPresenter
private var isHeaderViewNeeded: Boolean = false
private var headerViewHolder: HeaderViewHolder
private var isSummaryViewNeeded: Boolean = false

This comment was marked as resolved.

} else {
ViewHolder(LayoutInflater.from(context).inflate(R.layout.view_record, parent, false), itemClickListener)
when (viewType) {
TYPE_RECORD -> RecordViewHolder(LayoutInflater.from(context).inflate(R.layout.view_record, parent, false), itemClickListener)

This comment was marked as resolved.

@yev-kanivets
Copy link
Owner

@bogdan-evtushenko code is OK 🎉I'll do a functional review now.

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.

@bogdan-evtushenko functionally looks perfect 👍

@bogdan-evtushenko bogdan-evtushenko merged commit 7974c4f into dev Aug 28, 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