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
Conversation
Codecov Report
@@ 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.
|
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cache LayoutInflater?
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loool
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WAT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Closes #785
//cc @thevery @StanisVS