Indicate in fragment if cartridge is not inserted
This commit is contained in:
parent
58a8845ec3
commit
85ae946296
|
@ -26,6 +26,7 @@ import info.nightscout.androidaps.plugins.PumpInsightLocal.app_layer.parameter_b
|
|||
import info.nightscout.androidaps.plugins.PumpInsightLocal.descriptors.ActiveBasalRate;
|
||||
import info.nightscout.androidaps.plugins.PumpInsightLocal.descriptors.ActiveBolus;
|
||||
import info.nightscout.androidaps.plugins.PumpInsightLocal.descriptors.ActiveTBR;
|
||||
import info.nightscout.androidaps.plugins.PumpInsightLocal.descriptors.CartridgeStatus;
|
||||
import info.nightscout.androidaps.plugins.PumpInsightLocal.descriptors.TotalDailyDose;
|
||||
import info.nightscout.androidaps.queue.Callback;
|
||||
import info.nightscout.utils.DateUtil;
|
||||
|
@ -243,9 +244,13 @@ public class LocalInsightFragment extends SubscriberFragment implements View.OnC
|
|||
}
|
||||
|
||||
private void getCartridgeStatusItem(List<View> statusItems) {
|
||||
if (LocalInsightPlugin.getInstance().getCartridgeStatus() == null) return;
|
||||
statusItems.add(getStatusItem(MainApp.gs(R.string.pump_reservoir_label),
|
||||
DecimalFormatter.to2Decimal(LocalInsightPlugin.getInstance().getCartridgeStatus().getRemainingAmount()) + "U"));
|
||||
CartridgeStatus cartridgeStatus = LocalInsightPlugin.getInstance().getCartridgeStatus();
|
||||
if (cartridgeStatus == null) return;
|
||||
String status;
|
||||
if (cartridgeStatus.isInserted())
|
||||
status = DecimalFormatter.to2Decimal(LocalInsightPlugin.getInstance().getCartridgeStatus().getRemainingAmount()) + "U";
|
||||
else status = MainApp.gs(R.string.not_inserted);
|
||||
statusItems.add(getStatusItem(MainApp.gs(R.string.pump_reservoir_label), status));
|
||||
}
|
||||
|
||||
private void getTDDItems(List<View> statusItems) {
|
||||
|
|
|
@ -1265,6 +1265,7 @@
|
|||
<string name="disable_tbr_over_notification">Disable TBR over notification</string>
|
||||
<string name="refresh">Refresh</string>
|
||||
<string name="description_pump_insight_local">Pump integration for Accu-Chek Insight pumps</string>
|
||||
<string name="not_inserted">Not inserted</string>
|
||||
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d day</item>
|
||||
|
|
Loading…
Reference in a new issue