ReadHistoryCommand: minor cleanup.
This commit is contained in:
parent
5072273599
commit
d0c494fb56
|
@ -34,10 +34,13 @@ public class ReadHistoryCommand extends BaseCommand {
|
|||
|
||||
@Override
|
||||
public void execute() {
|
||||
if (request.bolusHistory != PumpHistoryRequest.SKIP
|
||||
|| request.tbrHistory != PumpHistoryRequest.SKIP
|
||||
|| request.pumpErrorHistory != PumpHistoryRequest.SKIP
|
||||
|| request.tddHistory != PumpHistoryRequest.SKIP) {
|
||||
if (request.bolusHistory == PumpHistoryRequest.SKIP
|
||||
&& request.tbrHistory == PumpHistoryRequest.SKIP
|
||||
&& request.pumpErrorHistory == PumpHistoryRequest.SKIP
|
||||
&& request.tddHistory == PumpHistoryRequest.SKIP) {
|
||||
throw new CommandException("History request but all data types are skipped");
|
||||
}
|
||||
|
||||
scripter.verifyMenuIsDisplayed(MenuType.MAIN_MENU);
|
||||
scripter.navigateToMenu(MenuType.MY_DATA_MENU);
|
||||
scripter.verifyMenuIsDisplayed(MenuType.MY_DATA_MENU);
|
||||
|
@ -134,7 +137,6 @@ public class ReadHistoryCommand extends BaseCommand {
|
|||
|
||||
result.success(true).history(history);
|
||||
}
|
||||
}
|
||||
|
||||
private void readTddRecords(long requestedTime) {
|
||||
int record = (int) scripter.getCurrentMenu().getAttribute(MenuAttribute.CURRENT_RECORD);
|
||||
|
|
Loading…
Reference in a new issue