cleanup code, remove some unneeded files

This commit is contained in:
Conny Duck 2017-10-18 00:20:26 +02:00
commit f2f3be37b3
47 changed files with 189 additions and 286 deletions

View file

@ -22,9 +22,9 @@ class AccountViewHolder extends RecyclerView.ViewHolder {
AccountViewHolder(View itemView) {
super(itemView);
container = itemView.findViewById(R.id.account_container);
username = (TextView) itemView.findViewById(R.id.account_username);
displayName = (TextView) itemView.findViewById(R.id.account_display_name);
avatar = (CircularImageView) itemView.findViewById(R.id.account_avatar);
username = itemView.findViewById(R.id.account_username);
displayName = itemView.findViewById(R.id.account_display_name);
avatar = itemView.findViewById(R.id.account_avatar);
}
void setupWithAccount(Account account) {

View file

@ -83,10 +83,10 @@ public class BlocksAdapter extends AccountAdapter {
BlockedUserViewHolder(View itemView) {
super(itemView);
avatar = (CircularImageView) itemView.findViewById(R.id.blocked_user_avatar);
username = (TextView) itemView.findViewById(R.id.blocked_user_username);
displayName = (TextView) itemView.findViewById(R.id.blocked_user_display_name);
unblock = (ImageButton) itemView.findViewById(R.id.blocked_user_unblock);
avatar = itemView.findViewById(R.id.blocked_user_avatar);
username = itemView.findViewById(R.id.blocked_user_username);
displayName = itemView.findViewById(R.id.blocked_user_display_name);
unblock = itemView.findViewById(R.id.blocked_user_unblock);
}
void setupWithAccount(Account account) {

View file

@ -84,11 +84,11 @@ public class FollowRequestsAdapter extends AccountAdapter {
FollowRequestViewHolder(View itemView) {
super(itemView);
avatar = (CircularImageView) itemView.findViewById(R.id.follow_request_avatar);
username = (TextView) itemView.findViewById(R.id.follow_request_username);
displayName = (TextView) itemView.findViewById(R.id.follow_request_display_name);
accept = (ImageButton) itemView.findViewById(R.id.follow_request_accept);
reject = (ImageButton) itemView.findViewById(R.id.follow_request_reject);
avatar = itemView.findViewById(R.id.follow_request_avatar);
username = itemView.findViewById(R.id.follow_request_username);
displayName = itemView.findViewById(R.id.follow_request_display_name);
accept = itemView.findViewById(R.id.follow_request_accept);
reject = itemView.findViewById(R.id.follow_request_reject);
}
void setupWithAccount(Account account) {

View file

@ -39,8 +39,8 @@ public class FooterViewHolder extends RecyclerView.ViewHolder {
FooterViewHolder(View itemView) {
super(itemView);
container = itemView.findViewById(R.id.footer_container);
progressBar = (ProgressBar) itemView.findViewById(R.id.footer_progress_bar);
endMessage = (TextView) itemView.findViewById(R.id.footer_end_message);
progressBar = itemView.findViewById(R.id.footer_progress_bar);
endMessage = itemView.findViewById(R.id.footer_end_message);
Drawable top = AppCompatResources.getDrawable(itemView.getContext(),
R.drawable.elephant_friend);
if (top != null) {

View file

@ -68,10 +68,10 @@ public class MutesAdapter extends AccountAdapter {
MutedUserViewHolder(View itemView) {
super(itemView);
avatar = (CircularImageView) itemView.findViewById(R.id.muted_user_avatar);
username = (TextView) itemView.findViewById(R.id.muted_user_username);
displayName = (TextView) itemView.findViewById(R.id.muted_user_display_name);
unmute = (ImageButton) itemView.findViewById(R.id.muted_user_unmute);
avatar = itemView.findViewById(R.id.muted_user_avatar);
username = itemView.findViewById(R.id.muted_user_username);
displayName = itemView.findViewById(R.id.muted_user_display_name);
unmute = itemView.findViewById(R.id.muted_user_unmute);
}
void setupWithAccount(Account account) {

View file

@ -200,10 +200,10 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
FollowViewHolder(View itemView) {
super(itemView);
message = (TextView) itemView.findViewById(R.id.notification_text);
usernameView = (TextView) itemView.findViewById(R.id.notification_username);
displayNameView = (TextView) itemView.findViewById(R.id.notification_display_name);
avatar = (ImageView) itemView.findViewById(R.id.notification_avatar);
message = itemView.findViewById(R.id.notification_text);
usernameView = itemView.findViewById(R.id.notification_username);
displayNameView = itemView.findViewById(R.id.notification_display_name);
avatar = itemView.findViewById(R.id.notification_avatar);
}
void setMessage(String displayName, String username, String avatarUrl) {
@ -247,13 +247,12 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
StatusNotificationViewHolder(View itemView) {
super(itemView);
message = (TextView) itemView.findViewById(R.id.notification_text);
icon = (ImageView) itemView.findViewById(R.id.notification_icon);
statusContent = (TextView) itemView.findViewById(R.id.notification_content);
container = (ViewGroup) itemView.findViewById(R.id.notification_container);
statusAvatar = (ImageView) itemView.findViewById(R.id.notification_status_avatar);
notificationAvatar = (ImageView)
itemView.findViewById(R.id.notification_notification_avatar);
message = itemView.findViewById(R.id.notification_text);
icon = itemView.findViewById(R.id.notification_icon);
statusContent = itemView.findViewById(R.id.notification_content);
container = itemView.findViewById(R.id.notification_container);
statusAvatar = itemView.findViewById(R.id.notification_status_avatar);
notificationAvatar = itemView.findViewById(R.id.notification_notification_avatar);
int darkerFilter = Color.rgb(123, 123, 123);
statusAvatar.setColorFilter(darkerFilter, PorterDuff.Mode.MULTIPLY);
notificationAvatar.setColorFilter(darkerFilter, PorterDuff.Mode.MULTIPLY);

View file

@ -120,8 +120,8 @@ public class ReportAdapter extends RecyclerView.Adapter {
ReportStatusViewHolder(View view) {
super(view);
content = (TextView) view.findViewById(R.id.report_status_content);
checkBox = (CheckBox) view.findViewById(R.id.report_status_check_box);
content = view.findViewById(R.id.report_status_content);
checkBox = view.findViewById(R.id.report_status_check_box);
}
void setupWithStatus(final ReportStatus status) {

View file

@ -80,7 +80,7 @@ public class SavedTootAdapter extends RecyclerView.Adapter {
return toot;
}
public TootEntity getItem(int position) {
private TootEntity getItem(int position) {
if (position >= 0 && position < list.size()) {
return list.get(position);
}
@ -111,8 +111,8 @@ public class SavedTootAdapter extends RecyclerView.Adapter {
TootViewHolder(View view) {
super(view);
this.view = view;
this.content = (TextView) view.findViewById(R.id.content);
this.suppr = (ImageButton) view.findViewById(R.id.suppr);
this.content = view.findViewById(R.id.content);
this.suppr = view.findViewById(R.id.suppr);
}
void bind(final int position, final TootEntity item) {

View file

@ -109,7 +109,7 @@ public class SearchResultsAdapter extends RecyclerView.Adapter {
HashtagViewHolder(View itemView) {
super(itemView);
hashtag = (TextView) itemView.findViewById(R.id.hashtag);
hashtag = itemView.findViewById(R.id.hashtag);
}
void setup(final String tag, final LinkListener listener) {

View file

@ -60,30 +60,30 @@ class StatusBaseViewHolder extends RecyclerView.ViewHolder {
StatusBaseViewHolder(View itemView) {
super(itemView);
container = itemView.findViewById(R.id.status_container);
displayName = (TextView) itemView.findViewById(R.id.status_display_name);
username = (TextView) itemView.findViewById(R.id.status_username);
timestamp = (TextView) itemView.findViewById(R.id.status_timestamp);
content = (TextView) itemView.findViewById(R.id.status_content);
avatar = (ImageView) itemView.findViewById(R.id.status_avatar);
replyButton = (ImageButton) itemView.findViewById(R.id.status_reply);
reblogButton = (SparkButton) itemView.findViewById(R.id.status_reblog);
favouriteButton = (SparkButton) itemView.findViewById(R.id.status_favourite);
moreButton = (ImageButton) itemView.findViewById(R.id.status_more);
displayName = itemView.findViewById(R.id.status_display_name);
username = itemView.findViewById(R.id.status_username);
timestamp = itemView.findViewById(R.id.status_timestamp);
content = itemView.findViewById(R.id.status_content);
avatar = itemView.findViewById(R.id.status_avatar);
replyButton = itemView.findViewById(R.id.status_reply);
reblogButton = itemView.findViewById(R.id.status_reblog);
favouriteButton = itemView.findViewById(R.id.status_favourite);
moreButton = itemView.findViewById(R.id.status_more);
reblogged = false;
favourited = false;
mediaPreview0 = (ImageView) itemView.findViewById(R.id.status_media_preview_0);
mediaPreview1 = (ImageView) itemView.findViewById(R.id.status_media_preview_1);
mediaPreview2 = (ImageView) itemView.findViewById(R.id.status_media_preview_2);
mediaPreview3 = (ImageView) itemView.findViewById(R.id.status_media_preview_3);
mediaPreview0 = itemView.findViewById(R.id.status_media_preview_0);
mediaPreview1 = itemView.findViewById(R.id.status_media_preview_1);
mediaPreview2 = itemView.findViewById(R.id.status_media_preview_2);
mediaPreview3 = itemView.findViewById(R.id.status_media_preview_3);
sensitiveMediaWarning = itemView.findViewById(R.id.status_sensitive_media_warning);
sensitiveMediaShow = itemView.findViewById(R.id.status_sensitive_media_button);
videoIndicator = itemView.findViewById(R.id.status_video_indicator);
mediaLabel = (TextView) itemView.findViewById(R.id.status_media_label);
mediaLabel = itemView.findViewById(R.id.status_media_label);
contentWarningBar = itemView.findViewById(R.id.status_content_warning_bar);
contentWarningDescription =
(TextView) itemView.findViewById(R.id.status_content_warning_description);
itemView.findViewById(R.id.status_content_warning_description);
contentWarningButton =
(ToggleButton) itemView.findViewById(R.id.status_content_warning_button);
itemView.findViewById(R.id.status_content_warning_button);
}
private void setDisplayName(String name) {

View file

@ -26,9 +26,9 @@ class StatusDetailedViewHolder extends StatusBaseViewHolder {
StatusDetailedViewHolder(View view) {
super(view);
reblogs = (TextView) view.findViewById(R.id.status_reblogs);
favourites = (TextView) view.findViewById(R.id.status_favourites);
application = (TextView) view.findViewById(R.id.status_application);
reblogs = view.findViewById(R.id.status_reblogs);
favourites = view.findViewById(R.id.status_favourites);
application = view.findViewById(R.id.status_application);
}
@Override

View file

@ -36,9 +36,9 @@ public class StatusViewHolder extends StatusBaseViewHolder {
StatusViewHolder(View itemView) {
super(itemView);
avatarReblog = (ImageView) itemView.findViewById(R.id.status_avatar_reblog);
avatarReblog = itemView.findViewById(R.id.status_avatar_reblog);
rebloggedBar = itemView.findViewById(R.id.status_reblogged_bar);
rebloggedByDisplayName = (TextView) itemView.findViewById(R.id.status_reblogged);
rebloggedByDisplayName = itemView.findViewById(R.id.status_reblogged);
}
@Override