Fix sorting crash

This commit is contained in:
Michael Mikovsky
2025-04-13 10:45:33 -06:00
parent c8c278b316
commit 50419e284c
3 changed files with 7 additions and 4 deletions
@@ -337,7 +337,10 @@ public class TallyType extends FieldType {
// parent.addView(new );
Collections.sort(views, (a, b) -> (int) ((b.average - a.average)*50.f));
try {
Collections.sort(views, (a, b) -> (int) ((b.average - a.average) * 50.f));
}catch (Exception e){}
for(int i = 0; i < views.size(); i++){
row = new TableRow(parent.getContext());
CandlestickView view = views.get(i);
@@ -102,7 +102,7 @@ public class AlertManager {
if(!errorList.isEmpty())
alert.setNeutralButton("View Detailed Error" + (errorList.size() != 1 ? "s" : ""), (dialogInterface, i) -> alert("Details", detailedErrors));
alert.setOnDismissListener((x) -> {if(currentError != null){errorList.clear(); simpleErrorList.clear();}});
// alert.setOnDismissListener((x) -> {if(currentError != null){errorList.clear(); simpleErrorList.clear();}});
alert.setCancelable(true);
currentError = alert.create();
@@ -76,8 +76,8 @@
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginEnd="5dp"
android:text="C"
android:textSize="20dp"
android:text=""
android:textSize="22dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />