Select group when adding credentials from browser extension (#2637)

This commit is contained in:
Sami Vänttinen 2019-01-30 16:48:22 +02:00 committed by Jonathan White
parent 779b529da2
commit 891f67a1cd
10 changed files with 178 additions and 11 deletions

View file

@ -257,6 +257,25 @@ Entry* Group::lastTopVisibleEntry() const
return m_lastTopVisibleEntry;
}
bool Group::isRecycled()
{
Group* group = this;
if (!group->database()) {
return false;
}
do {
if (group->m_parent && group->m_db->metadata()) {
if (group->m_parent == group->m_db->metadata()->recycleBin()) {
return true;
}
}
group = group->m_parent;
} while (group && group->m_parent && group->m_parent != group->m_db->rootGroup());
return false;
}
bool Group::isExpired() const
{
return m_data.timeInfo.expires() && m_data.timeInfo.expiryTime() < Clock::currentDateTimeUtc();