Skip to content

Commit

Permalink
Fix page count guessing with '-' modifier (fix #1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Aug 9, 2018
1 parent c11f5a7 commit 1f2ed38
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/src/models/page-api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,24 +235,22 @@ void PageApi::parseActual()
{ min = tag.count(); }
}
}
int searchTagsCount = 0;
int searchTagsCount = m_search.count();;
if (m_search.count() > found)
{
const QStringList modifiers = m_api->modifiers();
const QStringList modifiers = QStringList() << "-" << m_api->modifiers();
for (const QString &search : qAsConst(m_search))
{
for (const QString &modifier : modifiers)
{
if (search.startsWith(modifier))
{
searchTagsCount++;
searchTagsCount--;
break;
}
}
}
}
else
{ searchTagsCount = m_search.count(); }
if (searchTagsCount == found)
{
if (m_search.count() == 1)
Expand Down

0 comments on commit 1f2ed38

Please sign in to comment.