Don't create TBR record when pump has been paused

This commit is contained in:
TebbeUbben 2018-04-22 13:44:12 +02:00
parent 7c971197c7
commit 2844be85b5

View file

@ -183,7 +183,7 @@ class HistoryIntentAdapter {
}
if (intent.hasExtra(HistoryBroadcast.EXTRA_OLD_STATUS_TIME)) {
String oldStatus = intent.getStringExtra(HistoryBroadcast.EXTRA_OLD_STATUS);
if (oldStatus.equals("STOPPED") ||oldStatus.equals("PAUSED")) {
if (oldStatus.equals("STOPPED")) {
Date oldStatusTime = getDateExtra(intent, HistoryBroadcast.EXTRA_OLD_STATUS_TIME);
int duration = (int) ((newStatusTime.getTime() - oldStatusTime.getTime()) / 60000);