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