Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQLDelight interaction example #814

Merged
merged 3 commits into from Sep 4, 2017
Merged

Add SQLDelight interaction example #814

merged 3 commits into from Sep 4, 2017

Conversation

nikitin-da
Copy link
Collaborator

Closes #785
//cc @thevery @StanisVS

@codecov-io
Copy link

codecov-io commented Aug 13, 2017

Codecov Report

Merging #814 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #814   +/-   ##
=======================================
  Coverage   97.39%   97.39%           
=======================================
  Files          89       89           
  Lines        2692     2692           
  Branches      302      302           
=======================================
  Hits         2622     2622           
  Misses         38       38           
  Partials       32       32

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f10dc5...ee2b917. Read the comment docs.

Copy link
Member

@artem-zinnatullin artem-zinnatullin left a comment

Choose a reason for hiding this comment

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

LGTM, few nits!


private List<Customer> customers;

public void setCustomers(@Nullable List<Customer> customers) {
Copy link
Member

Choose a reason for hiding this comment

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

Let's not allow null and just pass empty list if needed?


@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ViewHolder(LayoutInflater.from(parent.getContext())
Copy link
Member

Choose a reason for hiding this comment

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

Cache LayoutInflater?

Copy link
Member

Choose a reason for hiding this comment

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

I would accept it as constructor parameter

return mapFromCursor(cursor, Customer.CURSOR_MAPPER);
}
})
.delay(1, SECONDS)
Copy link
Member

Choose a reason for hiding this comment

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

?

void addContent() {
final List<Customer> customers = new ArrayList<Customer>();

customers.add(Customer.builder().name("Artem").surname("Zinnatullin").city("SF").build());
Copy link
Member

Choose a reason for hiding this comment

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

loool

Copy link
Member

Choose a reason for hiding this comment

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

I would remove that though :D

@@ -0,0 +1,16 @@
import java.lang.Float;
Copy link
Member

Choose a reason for hiding this comment

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

WAT

Copy link
Member

@artem-zinnatullin artem-zinnatullin left a comment

Choose a reason for hiding this comment

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

👍

@nikitin-da nikitin-da merged commit c02e1fc into master Sep 4, 2017
@nikitin-da nikitin-da deleted the issue-785 branch September 4, 2017 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants