mirror of
https://github.com/GothenburgBitFactory/taskshell.git
synced 2025-06-26 10:54:29 +02:00
Review: Bug fixes
- Fixed bug where the wrong number of reviewed tasks was listed. - Improved spacing around prompt.
This commit is contained in:
parent
47d45bd793
commit
7ffbbd33b5
1 changed files with 9 additions and 8 deletions
|
@ -172,12 +172,13 @@ static const std::string banner (
|
||||||
static const std::string menu ()
|
static const std::string menu ()
|
||||||
{
|
{
|
||||||
Color text ("color15 on gray6");
|
Color text ("color15 on gray6");
|
||||||
return text.colorize (" (Enter) Skip, (e)dit, (c)ompleted, (d)eleted, Mark as (r)eviewed, (q)uit ");
|
return text.colorize (" (Enter) Skip, (e)dit, (c)ompleted, (d)eleted, Mark as (r)eviewed, (q)uit ") + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
static void reviewLoop (const std::vector <std::string>& uuids)
|
static void reviewLoop (const std::vector <std::string>& uuids)
|
||||||
{
|
{
|
||||||
|
unsigned int reviewed = 0;
|
||||||
auto total = uuids.size ();
|
auto total = uuids.size ();
|
||||||
auto width = getWidth ();
|
auto width = getWidth ();
|
||||||
|
|
||||||
|
@ -211,10 +212,10 @@ static void reviewLoop (const std::vector <std::string>& uuids)
|
||||||
// Display prompt, get input.
|
// Display prompt, get input.
|
||||||
auto response = getResponse (menu ());
|
auto response = getResponse (menu ());
|
||||||
|
|
||||||
if (response == "e") { editTask (uuid); ++current; }
|
if (response == "e") { editTask (uuid); ++current; ++reviewed; }
|
||||||
else if (response == "r") { reviewTask (uuid); ++current; }
|
else if (response == "r") { reviewTask (uuid); ++current; ++reviewed; }
|
||||||
else if (response == "c") { completeTask (uuid); ++current; }
|
else if (response == "c") { completeTask (uuid); ++current; ++reviewed; }
|
||||||
else if (response == "d") { deleteTask (uuid); ++current; }
|
else if (response == "d") { deleteTask (uuid); ++current; ++reviewed; }
|
||||||
else if (response == "q") { break; }
|
else if (response == "q") { break; }
|
||||||
else if (response == "") { std::cout << "Skipped\n\n"; ++current; }
|
else if (response == "") { std::cout << "Skipped\n\n"; ++current; }
|
||||||
else
|
else
|
||||||
|
@ -227,7 +228,7 @@ static void reviewLoop (const std::vector <std::string>& uuids)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "\n"
|
std::cout << "\n"
|
||||||
<< format (STRING_REVIEW_END, current, total)
|
<< format (STRING_REVIEW_END, reviewed, total)
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue