ReadHistoryCommand: minor cleanup.

This commit is contained in:
Johannes Mockenhaupt 2017-12-13 15:09:27 +01:00
parent 5072273599
commit d0c494fb56
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -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);