Skip to content

Commit

Permalink
Merge pull request #1099 from PhenoApps/long_press_delete
Browse files Browse the repository at this point in the history
long_press_delete
  • Loading branch information
trife authored Dec 5, 2024
2 parents acf73a1 + 9b34750 commit 2213878
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
<string name="menu_collect_repeated_values_indicator">Displays the number of repeated values.</string>
<string name="dialog_multi_measure_delete_no_observations">No observations exist.</string>
<string name="dialog_multi_measure_delete_title">Observations</string>
<string name="dialog_multi_measure_confirm_delete_title">These observations will be permanently deleted.</string>
<string name="dialog_multi_measure_confirm_delete_title">All observations for this trait will be permanently deleted.</string>
<string name="dialog_multi_measure_delete">Delete</string>
<string name="dialog_multi_measure_select_all">Select all</string>

Expand Down

0 comments on commit 2213878

Please sign in to comment.