convert entity classes to Kotlin data classes (#526)

* convert entity classes to Kotlin data classes

* more data classes, code style
This commit is contained in:
Konrad Pozniak 2018-03-03 13:24:03 +01:00 committed by GitHub
commit 71954a277e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 604 additions and 785 deletions

View file

@ -28,14 +28,14 @@ class AccountViewHolder extends RecyclerView.ViewHolder {
}
void setupWithAccount(Account account) {
accountId = account.id;
accountId = account.getId();
String format = username.getContext().getString(R.string.status_username_format);
String formattedUsername = String.format(format, account.username);
String formattedUsername = String.format(format, account.getUsername());
username.setText(formattedUsername);
displayName.setText(account.getDisplayName());
displayName.setText(account.getName());
Context context = avatar.getContext();
Picasso.with(context)
.load(account.avatar)
.load(account.getAvatar())
.placeholder(R.drawable.avatar_default)
.into(avatar);
}