mirror of
https://github.com/russok/FitoTrack.git
synced 2025-10-28 16:22:12 -07:00
#9 Import/Export feature Bugfixes
This commit is contained in:
parent
b0217119e7
commit
50e8976424
@ -34,6 +34,9 @@ public interface WorkoutDao {
|
||||
@Query("SELECT * FROM workout ORDER BY start DESC")
|
||||
Workout[] getWorkouts();
|
||||
|
||||
@Query("SELECT * FROM workout_sample")
|
||||
WorkoutSample[] getSamples();
|
||||
|
||||
@Insert
|
||||
void insertWorkoutAndSamples(Workout workout, WorkoutSample[] samples);
|
||||
|
||||
@ -46,7 +49,7 @@ public interface WorkoutDao {
|
||||
@Update
|
||||
void updateWorkout(Workout workout);
|
||||
|
||||
@Update
|
||||
@Insert
|
||||
void insertSample(WorkoutSample sample);
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ import androidx.room.ForeignKey;
|
||||
import androidx.room.Ignore;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.github.mikephil.charting.data.Entry;
|
||||
|
||||
import org.mapsforge.core.model.LatLong;
|
||||
@ -59,9 +60,11 @@ public class WorkoutSample{
|
||||
|
||||
public double speed;
|
||||
|
||||
@JsonIgnore
|
||||
@Ignore
|
||||
public Entry tmpEntry;
|
||||
|
||||
@JsonIgnore
|
||||
@Ignore
|
||||
public double tmpRoundedSpeed;
|
||||
|
||||
|
||||
@ -1,3 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2019 Jannis Scheibe <jannis@tadris.de>
|
||||
*
|
||||
* This file is part of FitoTrack
|
||||
*
|
||||
* FitoTrack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FitoTrack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.tadris.fitness.util.export;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
@ -45,7 +64,7 @@ public class Exporter {
|
||||
listener.onStatusChanged(20, context.getString(R.string.workouts));
|
||||
container.workouts.addAll(Arrays.asList(database.workoutDao().getWorkouts()));
|
||||
listener.onStatusChanged(40, context.getString(R.string.locationData));
|
||||
container.workouts.addAll(Arrays.asList(database.workoutDao().getWorkouts()));
|
||||
container.samples.addAll(Arrays.asList(database.workoutDao().getSamples()));
|
||||
|
||||
listener.onStatusChanged(60, context.getString(R.string.converting));
|
||||
|
||||
|
||||
@ -1,3 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2019 Jannis Scheibe <jannis@tadris.de>
|
||||
*
|
||||
* This file is part of FitoTrack
|
||||
*
|
||||
* FitoTrack is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FitoTrack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.tadris.fitness.view;
|
||||
|
||||
import android.app.Activity;
|
||||
@ -27,6 +46,7 @@ public class ProgressDialogController {
|
||||
|
||||
private void initDialog(){
|
||||
dialog.setContentView(R.layout.dialog_progress);
|
||||
dialog.setCancelable(false);
|
||||
infoView= dialog.findViewById(R.id.dialogProgressInfo);
|
||||
progressBar= dialog.findViewById(R.id.dialogProgressBar);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user