mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Maps: Fix track outline when no maps are available
This commit is contained in:
+1
-1
@@ -114,7 +114,7 @@ class WorkoutGpsFragment : Fragment() {
|
||||
|
||||
fun setTrackData(inputFile: File?) {
|
||||
this.inputFile = inputFile
|
||||
if (mapsManager.isMapLoaded && inputFile != null) {
|
||||
if (inputFile != null) {
|
||||
viewModel.loadTrackData(inputFile)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,13 +93,10 @@ public final class MapsManager {
|
||||
}
|
||||
|
||||
final DocumentFile folder = DocumentFile.fromTreeUri(mContext, Uri.parse(folderUri));
|
||||
if (folder == null || folder.listFiles().length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
final MultiMapDataStore multiMapDataStore = new MultiMapDataStore(MultiMapDataStore.DataPolicy.RETURN_ALL);
|
||||
|
||||
final DocumentFile[] documentFiles = folder.listFiles();
|
||||
final DocumentFile[] documentFiles = folder != null ? folder.listFiles() : new DocumentFile[0];
|
||||
|
||||
LOG.debug("Got {} map files", documentFiles.length);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user