From 5e75bc060cb423863b871eca668f0e1aa20c88bf Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 20 Jul 2018 23:24:23 +0200 Subject: [PATCH] remove unneeded method, it is only called once by the method above --- .../views/apps/AppListItemController.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java b/app/src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java index d2a8d902a..dfb27800f 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java +++ b/app/src/main/java/org/fdroid/fdroid/views/apps/AppListItemController.java @@ -56,7 +56,7 @@ import java.util.Iterator; * *

* The state of the UI is defined in a dumb {@link AppListItemState} class, then applied to the UI - * in the {@link #refreshView(App, AppUpdateStatus)} method. + * in the {@link #updateAppStatus(App, AppUpdateStatus)} method. */ public abstract class AppListItemController extends RecyclerView.ViewHolder { @@ -220,15 +220,10 @@ public abstract class AppListItemController extends RecyclerView.ViewHolder { } /** - * Updates both the progress bar and the circular install button (which shows progress around the outside of - * the circle). Also updates the app label to indicate that the app is being downloaded. - */ - private void updateAppStatus(@NonNull App app, @Nullable AppUpdateStatus status) { - currentStatus = status; - refreshView(app, status); - } - - /** + * Updates both the progress bar and the circular install button (which + * shows progress around the outside of the circle). Also updates the app + * label to indicate that the app is being downloaded. + *

* Queries the current state via {@link #getCurrentViewState(App, AppUpdateStatus)} * and then updates the relevant widgets depending on that state. *

@@ -238,7 +233,8 @@ public abstract class AppListItemController extends RecyclerView.ViewHolder { * @see AppListItemState * @see #getCurrentViewState(App, AppUpdateStatus) */ - private void refreshView(@NonNull App app, @Nullable AppUpdateStatus appStatus) { + private void updateAppStatus(@NonNull App app, @Nullable AppUpdateStatus appStatus) { + currentStatus = appStatus; AppListItemState viewState = getCurrentViewState(app, appStatus);