diff --git a/saoristyle.css b/saoristyle.css index b3f1521..86beba8 100644 --- a/saoristyle.css +++ b/saoristyle.css @@ -1,11 +1,17 @@ div.user_info { font-size:small; } + div.created_at { font-size:small; text-align:right; } +div.reblogger { + font-size:small; + text-align:right; +} + span.display_name { font-size:large; } diff --git a/saoriview.cpp b/saoriview.cpp index 210fd4f..af453c2 100644 --- a/saoriview.cpp +++ b/saoriview.cpp @@ -71,16 +71,32 @@ { QString result; if (json.isEmpty()) return QString(); - result += "
"; - result += accountParser(json["account"].toObject()); - result += "
"; - QDateTime dt = QDateTime::fromString(json["created_at"].toString(),"yyyy-MM-ddTHH:mm:ss.zzzZ"); - dt.setTimeSpec(Qt::UTC); - result += dt.toLocalTime().toString(); - result += "
"; - result += "
"; - result += json["content"].toString(); - result += "
"; + bool rebloged = false; + if (!json["reblog"].isNull()) rebloged = true; + if (rebloged) { + result += statusParser(json["reblog"].toObject()); + result += "
"; + } else { + result += "
"; + } + if (rebloged) { + result += ""; + result += tr("boosted by: %1").arg(json["account"].toObject()["display_name"].toString()); + } else { + result += accountParser(json["account"].toObject()); + result += "
"; + QDateTime dt = QDateTime::fromString(json["created_at"].toString(),"yyyy-MM-ddTHH:mm:ss.zzzZ"); + dt.setTimeSpec(Qt::UTC); + result += dt.toLocalTime().toString(); + result += "
"; + } + if (!rebloged) { + result += "
"; + result += json["content"].toString(); + result += "
"; + } result += "
"; return result; }