From 1b4c7de6e12f39efda4ea68fa16b857956a2be97 Mon Sep 17 00:00:00 2001 From: chaneylc Date: Thu, 5 Dec 2024 13:03:27 -0600 Subject: [PATCH 1/2] 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; + }); } /** From 9b3475087a58475a63bcb6fe247e404a82d906bc Mon Sep 17 00:00:00 2001 From: trife Date: Thu, 5 Dec 2024 15:24:55 -0500 Subject: [PATCH 2/2] string update --- app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b9764aa42..2e50ce82c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -518,7 +518,7 @@ Displays the number of repeated values. No observations exist. Observations - These observations will be permanently deleted. + All observations for this trait will be permanently deleted. Delete Select all