Skip to content

Commit 16b9131

Browse files
hitherejoeIván Carballo
authored andcommitted
Fix case where avatar may be null (ribot#44)
* Fix case where avatar may be null * Remove unwanted space * Remove robot avatar and revert back to display of hex colour
1 parent a9786a1 commit 16b9131

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/src/main/java/uk/co/ribot/androidboilerplate/data/local/Db.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public abstract static class RibotProfileTable {
3030
COLUMN_LAST_NAME + " TEXT NOT NULL, " +
3131
COLUMN_HEX_COLOR + " TEXT NOT NULL, " +
3232
COLUMN_DATE_OF_BIRTH + " INTEGER NOT NULL, " +
33-
COLUMN_AVATAR + " TEXT NOT NULL, " +
33+
COLUMN_AVATAR + " TEXT, " +
3434
COLUMN_BIO + " TEXT" +
3535
" ); ";
3636

app/src/main/java/uk/co/ribot/androidboilerplate/ui/main/RibotsAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public RibotViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
3838
}
3939

4040
@Override
41-
public void onBindViewHolder(RibotViewHolder holder, int position) {
41+
public void onBindViewHolder(final RibotViewHolder holder, int position) {
4242
Ribot ribot = mRibots.get(position);
4343
holder.hexColorView.setBackgroundColor(Color.parseColor(ribot.profile.hexColor));
4444
holder.nameTextView.setText(String.format("%s %s",

0 commit comments

Comments
 (0)