Skip to content

Commit

Permalink
fix for geometry count
Browse files Browse the repository at this point in the history
  • Loading branch information
jclark118 committed Oct 11, 2023
1 parent c43d004 commit ed92bea
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ private void displayFeatures(GeoPackage geoPackage, StyleCache styleCache, Strin
+ ", row: " + cursor.getPosition(), e);
}
}
if(getErrorCount() > 0){
int totalErrors = getErrorCount();
if(totalErrors > 0){
new Handler(Looper.getMainLooper()).post(() -> {

Toast toast = Toast.makeText(activity, "Error loading geometry", Toast.LENGTH_SHORT);
toast.show();
});
Expand Down Expand Up @@ -404,9 +404,10 @@ private void processFeatureIndexResults(FeatureIndexResults indexResults, String
}
} finally {
indexResults.close();
if(getErrorCount() > 0){
int totalErrors = getErrorCount();
if(totalErrors > 0){
new Handler(Looper.getMainLooper()).post(() -> {
Toast toast = Toast.makeText(activity, getErrorCount() + " Geometries failed to load", Toast.LENGTH_SHORT);
Toast toast = Toast.makeText(activity, totalErrors + " Geometries failed to load", Toast.LENGTH_SHORT);
toast.show();
});
setErrorCount(0);
Expand Down

0 comments on commit ed92bea

Please sign in to comment.