Skip to content

Commit 57e88d8

Browse files
Andyporrasjamescr
authored andcommitted
Fix duplicate filename issue when sharing traces
Fixed a bug where the filename would be duplicated when sharing a trace. The issue was caused by comparing the name with the trace start date instead of the creation date. Now, the correct comparison ensures the filename is properly assigned.
1 parent 4d5d1e4 commit 57e88d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/net/osmtracker/gpx/ExportToTempFileTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public ExportToTempFileTask(Context context, long trackId) {
3636
String exportLabelName = PreferenceManager.getDefaultSharedPreferences(context).getString(
3737
OSMTracker.Preferences.KEY_OUTPUT_FILENAME_LABEL, OSMTracker.Preferences.VAL_OUTPUT_FILENAME_LABEL);
3838
String trackName = new DataHelper(context).getTrackById(trackId).getName();
39-
long date = new DataHelper(context).getTrackById(trackId).getStartDate();
39+
long date = new DataHelper(context).getTrackById(trackId).getTrackDate();
4040

4141
String formattedTrackStartDate = DataHelper.FILENAME_FORMATTER.format(new Date(date));
4242

0 commit comments

Comments
 (0)