More clean up

This commit is contained in:
Christian Pauly 2020-01-19 15:30:23 +01:00
commit 5ad49c03a3
3 changed files with 6 additions and 3 deletions

View file

@ -14,7 +14,7 @@ extension LocalizedBody on Event {
getLocalizedBody(BuildContext context,
{bool withSenderNamePrefix = false, hideQuotes = false}) {
if (this.redacted) {
return "Redacted by ${this.redactedBecause.sender.calcDisplayname()}";
return "Removed by ${this.redactedBecause.sender.calcDisplayname()}";
}
String localizedBody = body;
final String senderName = this.sender.calcDisplayname();
@ -214,8 +214,11 @@ extension LocalizedBody on Event {
// Hide quotes
if (hideQuotes) {
print("+++ Hide quites +++");
List<String> lines = localizedBody.split("\n");
print("Lines with quotes: ${lines.length}");
lines.removeWhere((s) => s.startsWith("> "));
print("Lines without quotes: ${lines.length}");
localizedBody = lines.join("\n");
}