Skip to content

Commit

Permalink
Check if hiding notes by default is enabled, hide text if it is
Browse files Browse the repository at this point in the history
- Check if hide notes setting is enabled and update EntryModel notes'
  data if so
- Fixes keepassxreboot#4412
  • Loading branch information
JJuiice authored and droidmonkey committed Apr 4, 2020
1 parent e316a09 commit f0709d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gui/entry/EntryModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,12 @@ QVariant EntryModel::data(const QModelIndex& index, int role) const
}
return result;
case Notes:
// Display only first line of notes in simplified format
result = entry->notes().section("\n", 0, 0).simplified();
// 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();
}
if (attr->isReference(EntryAttributes::NotesKey)) {
result.prepend(tr("Ref: ", "Reference abbreviation"));
}
Expand Down

0 comments on commit f0709d1

Please sign in to comment.