2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

added chat backgrounds

This commit is contained in:
John Preston
2015-02-03 18:02:46 +03:00
parent a8e9c1b9e2
commit 70e85529c7
28 changed files with 1098 additions and 58 deletions

View File

@@ -2661,7 +2661,8 @@ QString Text::original(uint16 selectedFrom, uint16 selectedTo, bool expandLinks)
if (url.isEmpty() || !expandLinks || lnkFrom != rangeFrom || blockFrom != rangeTo) {
result += r;
} else {
if (r.size() > 3 && _text.midRef(lnkFrom, r.size() - 3) == url.midRef(0, r.size() - 3)) { // same link
QUrl u(url);
if (r.size() > 3 && _text.midRef(lnkFrom, r.size() - 3) == (u.isValid() ? u.toDisplayString() : url).midRef(0, r.size() - 3)) { // same link
result += url;
} else {
result.append(r).append(qsl(" ( ")).append(url).append(qsl(" )"));