Merge branch 'omnipod_eros_dev_omnipod_module' of github.com:AAPS-Omnipod/AndroidAPS into omnipod_eros_dev_omnipod_module

This commit is contained in:
Andy Rozman 2020-08-18 22:33:46 +01:00
commit 963f0ca851
2 changed files with 3 additions and 11 deletions

View file

@ -94,7 +94,7 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
fun initPodAction() { fun initPodAction() {
val pagerSettings = WizardPagerSettings() val pagerSettings = WizardPagerSettings()
var refreshAction = InitPodRefreshAction(injector, this, PodActionType.InitPod) var refreshAction = InitPodRefreshAction(injector, PodActionType.InitPod)
pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext) pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext)
pagerSettings.setFinishStringResourceId(R.string.close) pagerSettings.setFinishStringResourceId(R.string.close)
@ -122,7 +122,7 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
fun removePodAction() { fun removePodAction() {
val pagerSettings = WizardPagerSettings() val pagerSettings = WizardPagerSettings()
var refreshAction = InitPodRefreshAction(injector, this, PodActionType.RemovePod) var refreshAction = InitPodRefreshAction(injector, PodActionType.RemovePod)
pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext) pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext)
pagerSettings.setFinishStringResourceId(R.string.close) pagerSettings.setFinishStringResourceId(R.string.close)

View file

@ -16,7 +16,6 @@ import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag; import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload; import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.PodManagementActivity;
import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.defs.PodActionType; import info.nightscout.androidaps.plugins.pump.omnipod.dialogs.wizard.defs.PodActionType;
import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.sharedPreferences.SP; import info.nightscout.androidaps.utils.sharedPreferences.SP;
@ -27,7 +26,6 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
*/ */
public class InitPodRefreshAction extends AbstractCancelAction implements FinishActionInterface { public class InitPodRefreshAction extends AbstractCancelAction implements FinishActionInterface {
private PodManagementActivity podManagementActivity;
private PodActionType actionType; private PodActionType actionType;
@Inject PodStateManager podStateManager; @Inject PodStateManager podStateManager;
@ -36,9 +34,8 @@ public class InitPodRefreshAction extends AbstractCancelAction implements Finish
@Inject NSUpload nsUpload; @Inject NSUpload nsUpload;
@Inject DatabaseHelperInterface databaseHelper; @Inject DatabaseHelperInterface databaseHelper;
public InitPodRefreshAction(HasAndroidInjector injector, PodManagementActivity podManagementActivity, PodActionType actionType) { public InitPodRefreshAction(HasAndroidInjector injector, PodActionType actionType) {
injector.androidInjector().inject(this); injector.androidInjector().inject(this);
this.podManagementActivity = podManagementActivity;
this.actionType = actionType; this.actionType = actionType;
} }
@ -47,10 +44,6 @@ public class InitPodRefreshAction extends AbstractCancelAction implements Finish
if (cancelReason != null && cancelReason.trim().length() > 0) { if (cancelReason != null && cancelReason.trim().length() > 0) {
this.cancelActionText = cancelReason; this.cancelActionText = cancelReason;
} }
if (this.cancelActionText.equals("Cancel")) {
//AapsOmnipodManager.getInstance().resetPodStatus();
}
} }
@Override @Override
@ -83,7 +76,6 @@ public class InitPodRefreshAction extends AbstractCancelAction implements Finish
} }
} }
@Override @Override
public String getFinishActionText() { public String getFinishActionText() {
return "Finish_OK"; return "Finish_OK";