Merge pull request #909 from TebbeUbben/dev

Don't create TBR record when pump has been paused
This commit is contained in:
Milos Kozak 2018-04-22 15:42:30 +02:00 committed by GitHub
commit b81d2ec6da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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