Remove useless methods
This commit is contained in:
parent
004fddd82e
commit
d529a77995
|
@ -119,7 +119,7 @@ public class ShowConversationActivity extends BaseActivity implements OnRetrieve
|
|||
assert b != null;
|
||||
Status status = b.getParcelable("status");
|
||||
if (status != null && statusListAdapter != null) {
|
||||
statusListAdapter.notifyStatusWithActionChanged(status);
|
||||
statusListAdapter.notifyStatusChanged(status);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -280,19 +280,6 @@ public class ArtListAdapter extends RecyclerView.Adapter implements OnPostAction
|
|||
}
|
||||
}
|
||||
|
||||
public void notifyStatusWithActionChanged(Status status) {
|
||||
for (int i = 0; i < statusListAdapter.getItemCount(); i++) {
|
||||
//noinspection ConstantConditions
|
||||
if (statusListAdapter.getItemAt(i) != null && statusListAdapter.getItemAt(i).getId().equals(status.getId())) {
|
||||
try {
|
||||
statuses.set(i, status);
|
||||
statusListAdapter.notifyItemChanged(i);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRetrieveEmoji(Status status, boolean fromTranslation) {
|
||||
if (status != null) {
|
||||
|
|
|
@ -1411,18 +1411,6 @@ public class PixelfedListAdapter extends RecyclerView.Adapter implements OnPostA
|
|||
}
|
||||
}
|
||||
|
||||
public void notifyStatusWithActionChanged(Status status) {
|
||||
for (int i = 0; i < pixelfedListAdapter.getItemCount(); i++) {
|
||||
//noinspection ConstantConditions
|
||||
if (pixelfedListAdapter.getItemAt(i) != null && pixelfedListAdapter.getItemAt(i).getId().equals(status.getId())) {
|
||||
try {
|
||||
statuses.set(i, status);
|
||||
pixelfedListAdapter.notifyItemChanged(i);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRetrieveEmoji(Status status, boolean fromTranslation) {
|
||||
|
|
|
@ -352,7 +352,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
new TimelineCacheDAO(context, db).remove(refreshedStatus.getId());
|
||||
new PostActionAsyncTask(context, API.StatusAction.UNSTATUS, refreshedStatus.getId(), StatusListAdapter.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
statusListAdapter.notifyStatusWithActionChanged(refreshedStatus);
|
||||
statusListAdapter.notifyStatusChanged(refreshedStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4045,25 +4045,6 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
}
|
||||
}
|
||||
|
||||
public void notifyStatusWithActionChanged(Status status) {
|
||||
if (status == null)
|
||||
return;
|
||||
for (int i = 0; i < statusListAdapter.getItemCount(); i++) {
|
||||
//noinspection ConstantConditions
|
||||
if (statusListAdapter.getItemAt(i) != null && statusListAdapter.getItemAt(i).getId().equals(status.getId())) {
|
||||
try {
|
||||
statuses.get(i).setFavourites_count(status.getFavourites_count());
|
||||
statuses.get(i).setReblogs_count(status.getReblogs_count());
|
||||
statuses.get(i).setFavourited(status.isFavourited());
|
||||
statuses.get(i).setReblogged(status.isReblogged());
|
||||
statuses.get(i).setReplies_count(status.getReplies_count());
|
||||
statusListAdapter.notifyItemChanged(i);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRetrieveImage(Status status, boolean fromTranslation) {
|
||||
|
|
|
@ -257,7 +257,7 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
Status status = b.getParcelable("status");
|
||||
String delete_statuses_from = b.getString("delete_statuses_for_id", null);
|
||||
if (status != null && statusListAdapter != null) {
|
||||
statusListAdapter.notifyStatusWithActionChanged(status);
|
||||
statusListAdapter.notifyStatusChanged(status);
|
||||
} else if (delete_statuses_from != null) {
|
||||
List<Status> statusesToRemove = new ArrayList<>();
|
||||
for (Status status_temp : statuses) {
|
||||
|
|
Loading…
Reference in New Issue