mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-07 06:22:44 -04:00
Check if hiding notes by default is enabled, hide text if it is
- Check if hide notes setting is enabled and update EntryModel notes' data if so - Fixes #4412
This commit is contained in:
parent
e316a09a79
commit
f0709d187d
1 changed files with 6 additions and 2 deletions
|
@ -185,8 +185,12 @@ QVariant EntryModel::data(const QModelIndex& index, int role) const
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
case Notes:
|
case Notes:
|
||||||
// Display only first line of notes in simplified format
|
// Display only first line of notes in simplified format if not hidden
|
||||||
|
if (config()->get("security/hidenotes").toBool()) {
|
||||||
|
result = EntryModel::HiddenContentDisplay;
|
||||||
|
} else {
|
||||||
result = entry->notes().section("\n", 0, 0).simplified();
|
result = entry->notes().section("\n", 0, 0).simplified();
|
||||||
|
}
|
||||||
if (attr->isReference(EntryAttributes::NotesKey)) {
|
if (attr->isReference(EntryAttributes::NotesKey)) {
|
||||||
result.prepend(tr("Ref: ", "Reference abbreviation"));
|
result.prepend(tr("Ref: ", "Reference abbreviation"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue