[#15]
- changed gradle with different version numbering - changed the init code, to check if pod was already set, and afterwards does refresh of Tab and Overview...
This commit is contained in:
parent
73f1aaf819
commit
df82a90b36
|
@ -109,8 +109,9 @@ android {
|
|||
targetSdkVersion 28
|
||||
multiDexEnabled true
|
||||
versionCode 1500
|
||||
version "2.6-dev-omnipod"
|
||||
version "omnipod-0.1-SNAPSHOT"
|
||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||
buildConfigField "String", "DEV_VERSION", "2.6-dev"
|
||||
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
||||
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'
|
||||
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
|
||||
|
|
|
@ -353,7 +353,6 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
|
|||
// we would probably need to read Basal Profile here too
|
||||
}
|
||||
|
||||
//OmnipodStatusRequest pumpStatusRequest = null;
|
||||
|
||||
List<OmnipodStatusRequest> omnipodStatusRequestList = new ArrayList<>();
|
||||
|
||||
|
@ -385,12 +384,20 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
|
|||
|
||||
setRefreshButtonEnabled(false);
|
||||
|
||||
String podState = SP.getString(OmnipodConst.Prefs.PodState, null);
|
||||
PodSessionState podSessionState = null;
|
||||
|
||||
if (podState != null) {
|
||||
PodSessionState podSessionState = OmnipodUtil.getGsonInstance().fromJson(podState, PodSessionState.class);
|
||||
OmnipodUtil.setPodSessionState(podSessionState);
|
||||
if (OmnipodUtil.getPodSessionState()!=null) {
|
||||
podSessionState = OmnipodUtil.getPodSessionState();
|
||||
} else {
|
||||
String podState = SP.getString(OmnipodConst.Prefs.PodState, null);
|
||||
|
||||
if (podState != null) {
|
||||
podSessionState = OmnipodUtil.getGsonInstance().fromJson(podState, PodSessionState.class);
|
||||
OmnipodUtil.setPodSessionState(podSessionState);
|
||||
}
|
||||
}
|
||||
|
||||
if (podSessionState!=null) {
|
||||
LOG.debug("PodSessionState (saved): " + podSessionState);
|
||||
|
||||
// TODO handle if session state too old
|
||||
|
@ -399,16 +406,22 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
|
|||
|
||||
// TODO handle time
|
||||
|
||||
if (!isRefresh) {
|
||||
pumpState = PumpDriverState.Initialized;
|
||||
}
|
||||
|
||||
triggerUIChange();
|
||||
RxBus.INSTANCE.send(new EventOmnipodPumpValuesChanged());
|
||||
|
||||
getPodPumpStatus();
|
||||
|
||||
} else {
|
||||
LOG.debug("No PodSessionState found. Pod probably not running.");
|
||||
}
|
||||
|
||||
|
||||
setRefreshButtonEnabled(true);
|
||||
|
||||
if (!isRefresh) {
|
||||
pumpState = PumpDriverState.Initialized;
|
||||
}
|
||||
|
||||
if (!sentIdToFirebase) {
|
||||
Bundle params = new Bundle();
|
||||
|
|
|
@ -14,8 +14,6 @@ import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil;
|
|||
/**
|
||||
* Created by andy on 30.11.2019.
|
||||
*/
|
||||
|
||||
|
||||
@DatabaseTable(tableName = DatabaseHelper.DATABASE_POD_HISTORY)
|
||||
public class PodHistory implements DbObjectBase {
|
||||
|
||||
|
|
Loading…
Reference in a new issue