CmdDefault: Obeys :quiet

This commit is contained in:
Paul Beckingham 2016-04-06 00:48:51 -04:00
parent e202bcb5ce
commit 39daf9a422

View file

@ -32,12 +32,15 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int CmdDefault (Rules& rules, Database& database) int CmdDefault (Rules& rules, Database& database)
{ {
// Load the most recent interval, summarize and display. if (rules.getBoolean ("verbose"))
auto interval = database.getLatestInterval (); {
if (interval.isStarted () && ! interval.isEnded ()) // Load the most recent interval, summarize and display.
std::cout << intervalSummarize (rules, database.getLatestInterval ()); auto interval = database.getLatestInterval ();
else if (interval.isStarted () && ! interval.isEnded ())
std::cout << "There is no active time tracking.\n"; std::cout << intervalSummarize (rules, database.getLatestInterval ());
else
std::cout << "There is no active time tracking.\n";
}
return 0; return 0;
} }