mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
Display Toast when trying to import old Misfit data (unsupported)
... and update TODO
This commit is contained in:
parent
6119f3501a
commit
0ae9955a6f
5
TODO.md
5
TODO.md
@ -1,8 +1,11 @@
|
||||
TODO before 0.12.0 release:
|
||||
|
||||
* Patch GreenDAO to support composite primary keys
|
||||
* ~~Patch GreenDAO to support composite primary keys~~
|
||||
* ~~Support importing Pebble Health data from old database~~ DONE, needs check.
|
||||
* Fix user attribute table being spammed
|
||||
|
||||
Non blocking issues:
|
||||
|
||||
* Add back UUID_CHARACTERISTIC_PAIR support, at least optionally
|
||||
* CSV Export
|
||||
* Imorove mapping from device to device coordinator + support class
|
||||
|
@ -5,6 +5,7 @@ import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -20,6 +21,7 @@ import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.AbstractSampleProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.pebble.PebbleHealthSampleProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.pebble.PebbleMisfitSampleProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.AbstractActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||
import nodomain.freeyourgadget.gadgetbridge.entities.Device;
|
||||
@ -39,6 +41,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.ValidByDate;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.DateTimeUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.FileUtils;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
|
||||
import static nodomain.freeyourgadget.gadgetbridge.database.DBConstants.KEY_CUSTOM_SHORT;
|
||||
import static nodomain.freeyourgadget.gadgetbridge.database.DBConstants.KEY_INTENSITY;
|
||||
@ -401,6 +404,11 @@ public class DBHelper {
|
||||
}
|
||||
|
||||
private <T extends AbstractActivitySample> void importActivitySamples(SQLiteDatabase fromDb, GBDevice targetDevice, DaoSession targetSession, AbstractSampleProvider<T> sampleProvider, User user) {
|
||||
if (sampleProvider instanceof PebbleMisfitSampleProvider) {
|
||||
GB.toast(context, "Migration of old Misfit data is not supported!", Toast.LENGTH_LONG, GB.WARN);
|
||||
return;
|
||||
}
|
||||
|
||||
String order = "timestamp";
|
||||
final String where = "provider=" + sampleProvider.getID();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user