|
|
|
@ -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");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|