From 185b5de51d0127cb662a2d3ad31837beaf1bb4c5 Mon Sep 17 00:00:00 2001 From: Michael W Date: Sun, 18 Jun 2023 16:22:39 +0200 Subject: [PATCH] Updater: Don't show delete twice * If an update exists and can be deleted, the action button AND the popup menu both show the delete action * By checking wether the action already shows "Delete" we can hide that action from the submenu * Additionally check for online availability to only hide it when it's not the last item - otherwise a click on the menu icon wouldn't do anything Change-Id: Idc5da3962be4e0a69847f47b3c5f014b251bd438 --- .../java/org/lineageos/updater/UpdatesListAdapter.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/lineageos/updater/UpdatesListAdapter.java b/app/src/main/java/org/lineageos/updater/UpdatesListAdapter.java index e01825d4..09564493 100644 --- a/app/src/main/java/org/lineageos/updater/UpdatesListAdapter.java +++ b/app/src/main/java/org/lineageos/updater/UpdatesListAdapter.java @@ -532,11 +532,15 @@ public class UpdatesListAdapter extends RecyclerView.Adapter { int itemId = item.getItemId();