fix hiding gpx files on maps after deleting from my places p1
This commit is contained in:
parent
ae89349d14
commit
a8f780a46c
2 changed files with 4 additions and 6 deletions
|
@ -1507,17 +1507,15 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment implement
|
||||||
int total = 0;
|
int total = 0;
|
||||||
for (GpxInfo info : params) {
|
for (GpxInfo info : params) {
|
||||||
if (!isCancelled() && (info.gpx == null || !info.gpx.showCurrentTrack)) {
|
if (!isCancelled() && (info.gpx == null || !info.gpx.showCurrentTrack)) {
|
||||||
boolean successfull;
|
boolean successful = FileUtils.removeGpxFile(app, info.file);
|
||||||
successfull = removeAllFiles(info.file);
|
|
||||||
app.getGpxDbHelper().remove(info.file);
|
|
||||||
total++;
|
total++;
|
||||||
if (successfull) {
|
if (successful) {
|
||||||
count++;
|
count++;
|
||||||
publishProgress(info);
|
publishProgress(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return app.getString(R.string.local_index_items_deleted, count, total);
|
return getString(R.string.local_index_items_deleted, count, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -866,7 +866,7 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
|
||||||
R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
R.string.shared_string_ok, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
if (FileUtils.removeGpxFile(app, new File((gpxFile.path)))) {
|
if (FileUtils.removeGpxFile(app, new File(gpxFile.path))) {
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue