fix duplication

This commit is contained in:
pufit 2023-03-12 12:54:42 -04:00 committed by Nikita Mikhaylov
parent 72769d468e
commit 18fada7028

View File

@ -204,13 +204,9 @@ bool KeeperClient::processQueryText(const String & text)
{ {
if (need_confirmation) if (need_confirmation)
{ {
if (tokens.size() == 1 && (tokens[0] == "y" || tokens[0] == "Y"))
{
need_confirmation = false;
confirmation_callback();
}
need_confirmation = false; need_confirmation = false;
if (tokens.size() == 1 && (tokens[0] == "y" || tokens[0] == "Y"))
confirmation_callback();
} }
else if (tokens.size() == 1 && tokens[0].size() == 4 && four_letter_word_commands.find(tokens[0]) != four_letter_word_commands.end()) else if (tokens.size() == 1 && tokens[0].size() == 4 && four_letter_word_commands.find(tokens[0]) != four_letter_word_commands.end())
std::cout << executeFourLetterCommand(tokens[0]) << "\n"; std::cout << executeFourLetterCommand(tokens[0]) << "\n";