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