mirror of
https://github.com/russok/FitoTrack.git
synced 2025-10-29 00:32:11 -07:00
Data Import up to 5 times faster and more secure if it fails
This commit is contained in:
parent
99182791f9
commit
82e383e953
@ -95,6 +95,8 @@ public class Exporter {
|
||||
.commit();
|
||||
|
||||
AppDatabase database= Instance.getInstance(context).db;
|
||||
|
||||
database.runInTransaction(() -> {
|
||||
database.clearAllTables();
|
||||
|
||||
listener.onStatusChanged(60, context.getString(R.string.workouts));
|
||||
@ -110,6 +112,8 @@ public class Exporter {
|
||||
database.workoutDao().insertSample(sample);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
listener.onStatusChanged(100, context.getString(R.string.finished));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user