diff --git a/app/src/main/java/com/keylesspalace/tusky/BlocksAdapter.java b/app/src/main/java/com/keylesspalace/tusky/BlocksAdapter.java index c37ae1ba..94fb7a3c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/BlocksAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/BlocksAdapter.java @@ -66,9 +66,6 @@ class BlocksAdapter extends AccountAdapter { } else { FooterViewHolder holder = (FooterViewHolder) viewHolder; holder.setState(footerState); - holder.setupButton(footerActionListener); - holder.setRetryMessage(R.string.footer_retry_accounts); - holder.setEndOfTimelineMessage(R.string.footer_end_of_accounts); } } diff --git a/app/src/main/java/com/keylesspalace/tusky/FollowAdapter.java b/app/src/main/java/com/keylesspalace/tusky/FollowAdapter.java index 13b865d0..c19afcb4 100644 --- a/app/src/main/java/com/keylesspalace/tusky/FollowAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/FollowAdapter.java @@ -61,9 +61,6 @@ class FollowAdapter extends AccountAdapter { } else { FooterViewHolder holder = (FooterViewHolder) viewHolder; holder.setState(footerState); - holder.setupButton(footerActionListener); - holder.setRetryMessage(R.string.footer_retry_accounts); - holder.setEndOfTimelineMessage(R.string.footer_end_of_accounts); } } diff --git a/app/src/main/java/com/keylesspalace/tusky/FooterViewHolder.java b/app/src/main/java/com/keylesspalace/tusky/FooterViewHolder.java index d285d8a8..46d9d7a1 100644 --- a/app/src/main/java/com/keylesspalace/tusky/FooterViewHolder.java +++ b/app/src/main/java/com/keylesspalace/tusky/FooterViewHolder.java @@ -22,11 +22,7 @@ import android.widget.ProgressBar; import android.widget.TextView; class FooterViewHolder extends RecyclerView.ViewHolder { - private View retryBar; - private TextView retryMessage; - private Button retry; private ProgressBar progressBar; - private TextView endOfTimelineMessage; enum State { LOADING, @@ -36,49 +32,22 @@ class FooterViewHolder extends RecyclerView.ViewHolder { FooterViewHolder(View itemView) { super(itemView); - retryBar = itemView.findViewById(R.id.footer_retry_bar); - retryMessage = (TextView) itemView.findViewById(R.id.footer_retry_message); - retry = (Button) itemView.findViewById(R.id.footer_retry_button); progressBar = (ProgressBar) itemView.findViewById(R.id.footer_progress_bar); progressBar.setIndeterminate(true); - endOfTimelineMessage = (TextView) itemView.findViewById(R.id.footer_end_of_timeline_text); - } - - void setupButton(final FooterActionListener listener) { - retry.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - listener.onLoadMore(); - } - }); - } - - void setRetryMessage(int messageId) { - retryMessage.setText(messageId); - } - - void setEndOfTimelineMessage(int messageId) { - endOfTimelineMessage.setText(messageId); } void setState(State state) { switch (state) { case LOADING: { - retryBar.setVisibility(View.GONE); progressBar.setVisibility(View.VISIBLE); - endOfTimelineMessage.setVisibility(View.GONE); break; } case RETRY: { - retryBar.setVisibility(View.VISIBLE); progressBar.setVisibility(View.GONE); - endOfTimelineMessage.setVisibility(View.GONE); break; } case END_OF_TIMELINE: { - retryBar.setVisibility(View.GONE); progressBar.setVisibility(View.GONE); - endOfTimelineMessage.setVisibility(View.VISIBLE); break; } } diff --git a/app/src/main/java/com/keylesspalace/tusky/NotificationsAdapter.java b/app/src/main/java/com/keylesspalace/tusky/NotificationsAdapter.java index eecb1e33..53aa5da3 100644 --- a/app/src/main/java/com/keylesspalace/tusky/NotificationsAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/NotificationsAdapter.java @@ -110,9 +110,6 @@ class NotificationsAdapter extends RecyclerView.Adapter implements AdapterItemRe } else { FooterViewHolder holder = (FooterViewHolder) viewHolder; holder.setState(footerState); - holder.setupButton(footerListener); - holder.setRetryMessage(R.string.footer_retry_notifications); - holder.setEndOfTimelineMessage(R.string.footer_end_of_notifications); } } diff --git a/app/src/main/java/com/keylesspalace/tusky/TimelineAdapter.java b/app/src/main/java/com/keylesspalace/tusky/TimelineAdapter.java index f0598d89..4bf1c598 100644 --- a/app/src/main/java/com/keylesspalace/tusky/TimelineAdapter.java +++ b/app/src/main/java/com/keylesspalace/tusky/TimelineAdapter.java @@ -68,9 +68,6 @@ class TimelineAdapter extends RecyclerView.Adapter implements AdapterItemRemover } else { FooterViewHolder holder = (FooterViewHolder) viewHolder; holder.setState(footerState); - holder.setupButton(footerListener); - holder.setRetryMessage(R.string.footer_retry_statuses); - holder.setEndOfTimelineMessage(R.string.footer_end_of_statuses); } } diff --git a/app/src/main/res/layout/item_footer.xml b/app/src/main/res/layout/item_footer.xml index 477f9421..69204b57 100644 --- a/app/src/main/res/layout/item_footer.xml +++ b/app/src/main/res/layout/item_footer.xml @@ -2,7 +2,8 @@ - - - - - -