Fix typo. Only have warning show for correct vehicle. Remove log screen when vehicle deleted.

This commit is contained in:
2020-08-22 19:47:44 -04:00
parent 43035181af
commit e20d6ce723
4 changed files with 9 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
/*
* <one line to give the program's name and a brief idea of what it does.>
* Copyright (C) 2020 <Kevin Whitakerr> <eyecreate@eyecreate.org>
*
* This program is free software: you can redistribute it and/or modify
@@ -47,9 +46,9 @@ void RecordAnalytics::checkOilChangeNeededForVehicle(int vehicleId, int milesFor
}
}
if(lastKnownMiles-lastOilMiles > milesForChange || lastOilMiles == 0 || !lastOilDate.isValid() || lastOilDate.daysTo(QDateTime::currentDateTime()) > 30*monthsForChange) {
emit this->isOilChangeNeeded(true);
emit this->isOilChangeNeeded(true, vehicleId);
} else {
emit this->isOilChangeNeeded(false);
emit this->isOilChangeNeeded(false, vehicleId);
}
});
}