Merge pull request #857 from TebbeUbben/disable-tdd-load-button
Hide TDD buttons
This commit is contained in:
commit
b2129fa48e
|
@ -129,6 +129,9 @@ public class TDDStatsActivity extends Activity {
|
|||
}
|
||||
totalBaseBasal.setText(TBB);
|
||||
|
||||
if (!ConfigBuilderPlugin.getActivePump().getPumpDescription().needsManualTDDLoad)
|
||||
reloadButton.setVisibility(View.GONE);
|
||||
|
||||
// stats table
|
||||
tl = (TableLayout) findViewById(R.id.main_table);
|
||||
TableRow tr_head = new TableRow(this);
|
||||
|
@ -436,7 +439,7 @@ public class TDDStatsActivity extends Activity {
|
|||
TableLayout.LayoutParams.WRAP_CONTENT));
|
||||
}
|
||||
|
||||
if (isOldData(historyList)) {
|
||||
if (isOldData(historyList) && ConfigBuilderPlugin.getActivePump().getPumpDescription().needsManualTDDLoad) {
|
||||
statsMessage.setVisibility(View.VISIBLE);
|
||||
statsMessage.setText(getString(R.string.danar_stats_olddata_Message));
|
||||
|
||||
|
|
|
@ -41,4 +41,7 @@ public class PumpDescription {
|
|||
public boolean storesCarbInfo = true;
|
||||
|
||||
public boolean is30minBasalRatesCapable = false;
|
||||
|
||||
public boolean supportsTDDs = false;
|
||||
public boolean needsManualTDDLoad = true;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,6 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
tddStats = view.findViewById(R.id.actions_tddstats);
|
||||
history = view.findViewById(R.id.actions_historybrowser);
|
||||
|
||||
|
||||
profileSwitch.setOnClickListener(this);
|
||||
tempTarget.setOnClickListener(this);
|
||||
extendedBolus.setOnClickListener(this);
|
||||
|
@ -191,6 +190,9 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
tempTarget.setVisibility(View.GONE);
|
||||
else
|
||||
tempTarget.setVisibility(View.VISIBLE);
|
||||
|
||||
if (!ConfigBuilderPlugin.getActivePump().getPumpDescription().supportsTDDs) tddStats.setVisibility(View.GONE);
|
||||
else tddStats.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -112,6 +112,9 @@ public class ComboPlugin extends PluginBase implements PumpInterface, Constraint
|
|||
pumpDescription.storesCarbInfo = false;
|
||||
|
||||
pumpDescription.is30minBasalRatesCapable = false;
|
||||
|
||||
pumpDescription.supportsTDDs = true;
|
||||
pumpDescription.needsManualTDDLoad = true;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
@ -72,6 +72,9 @@ public class DanaRPlugin extends AbstractDanaRPlugin {
|
|||
pumpDescription.isRefillingCapable = true;
|
||||
|
||||
pumpDescription.storesCarbInfo = true;
|
||||
|
||||
pumpDescription.supportsTDDs = true;
|
||||
pumpDescription.needsManualTDDLoad = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -73,6 +73,9 @@ public class DanaRKoreanPlugin extends AbstractDanaRPlugin {
|
|||
pumpDescription.isRefillingCapable = true;
|
||||
|
||||
pumpDescription.storesCarbInfo = true;
|
||||
|
||||
pumpDescription.supportsTDDs = true;
|
||||
pumpDescription.needsManualTDDLoad = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -111,6 +111,9 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
pumpDescription.isRefillingCapable = true;
|
||||
|
||||
pumpDescription.storesCarbInfo = true;
|
||||
|
||||
pumpDescription.supportsTDDs = true;
|
||||
pumpDescription.needsManualTDDLoad = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -73,6 +73,9 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
|
|||
pumpDescription.isRefillingCapable = true;
|
||||
|
||||
pumpDescription.storesCarbInfo = true;
|
||||
|
||||
pumpDescription.supportsTDDs = true;
|
||||
pumpDescription.needsManualTDDLoad = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -142,6 +142,9 @@ public class InsightPlugin extends PluginBase implements PumpInterface, Constrai
|
|||
pumpDescription.isRefillingCapable = true;
|
||||
|
||||
pumpDescription.storesCarbInfo = false;
|
||||
|
||||
pumpDescription.supportsTDDs = true;
|
||||
pumpDescription.needsManualTDDLoad = false;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue