summary refs log tree commit diff
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2019-06-13 22:33:04 -0400
committerJoseph Donofry <joedonofry@gmail.com>2019-06-13 22:33:04 -0400
commit129beb57c9525439d04fc2bf74f4ccaed30369c9 (patch)
tree726c166c1a486a6f635cf62437caa63401a31470 /src/Utils.cpp
parentMerge branch '0.7.0-dev' of ssh://github.com/Nheko-Reborn/nheko into 0.7.0-dev (diff)
downloadnheko-129beb57c9525439d04fc2bf74f4ccaed30369c9.tar.xz
Further Improve Reply Functionality
Quoted replies now include matrix.to links for the event and the user.
UI Rendering has been (slightly) improved... still very WIP.
Restructured the reply structure in the code for future usability
improvements.
Diffstat (limited to '')
-rw-r--r--src/Utils.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp

index f8fdfaf9..690a9a9a 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp
@@ -315,6 +315,20 @@ utils::markdownToHtml(const QString &text) } QString +utils::getFormattedQuoteBody(const RelatedInfo &related, const QString &html) +{ + return QString("<mx-reply><blockquote><a " + "href=\"https://matrix.to/#/!%1\">In reply " + "to</a><a href=\"https://matrix.to/#/%2\">%3</a><br " + "/>%4</blockquote></mx-reply>") + .arg(QString::fromStdString(related.related_event), + related.quoted_user, + related.quoted_user, + related.quoted_body) + + html; +} + +QString utils::linkColor() { QSettings settings;