From 1b4c7de6e12f39efda4ea68fa16b857956a2be97 Mon Sep 17 00:00:00 2001 From: chaneylc Date: Thu, 5 Dec 2024 13:03:27 -0600 Subject: [PATCH] closes #970 long press shows dialog to delete repeated values for current plot/trait --- .../tracker/activities/CollectActivity.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/java/com/fieldbook/tracker/activities/CollectActivity.java b/app/src/main/java/com/fieldbook/tracker/activities/CollectActivity.java index c8a99b3b2..b411a760f 100644 --- a/app/src/main/java/com/fieldbook/tracker/activities/CollectActivity.java +++ b/app/src/main/java/com/fieldbook/tracker/activities/CollectActivity.java @@ -731,6 +731,18 @@ private void initToolbars() { triggerTts(deleteTts); }); + deleteValue.setOnLongClickListener(v -> { + + ObservationModel[] models = database.getRepeatedValues(getStudyId(), getObservationUnit(), getTraitDbId()); + + if (models.length > 0) { + + showConfirmMultiMeasureDeleteDialog(List.of(models)); + + } + + return true; + }); } /**