diff --git a/saoriview.cpp b/saoriview.cpp index 0918ac1..d05f895 100644 --- a/saoriview.cpp +++ b/saoriview.cpp @@ -176,14 +176,18 @@ result = (!json["reblog"].isNull()) ? (statusParser(json["reblog"].toObject()) + - htmlDiv("reblogger",htmlHr() + - htmlImg("mavatar",json["account"].toObject()["avatar"].toString()) + - tr("boosted by: %1").arg(json["account"].toObject()["display_name"].toString())) + htmlAnc("accounts:" + json["account"].toObject()["id"].toString(), + htmlDiv("reblogger",htmlHr() + + htmlImg("mavatar",json["account"].toObject()["avatar"].toString()) + + tr("boosted by: %1").arg(json["account"].toObject()["display_name"].toString()) + ) + ) ) : (htmlDiv("status",accountParser(json["account"].toObject()) + htmlDiv("created_at",tr("created at :") + dt.toLocalTime().toString()) + - htmlDiv("content",contentParser(json["content"].toString()))) + htmlDiv("content",contentParser(json["content"].toString())) + ) ); if (json["reblog"].isNull()) { QString media; @@ -201,10 +205,10 @@ QString result; if (json.isEmpty()) return QString(); result = htmlDiv("account", - htmlSpan("avatar", - htmlHr() + - htmlImg("avatar",json["avatar"].toString())) + htmlAnc("accounts:" + json["id"].toString(), + htmlSpan("avatar", + htmlHr() + + htmlImg("avatar",json["avatar"].toString())) + htmlSpan("display_name", json["display_name"].toString()) + " " + @@ -214,8 +218,9 @@ tr(" following: ") + QString::number(json["following_count"].toInt()) + tr(" followers: ") + - QString::number(json["followers_count"].toInt())) - ); + QString::number(json["followers_count"].toInt()) + ) + ); return result; } @@ -298,10 +303,14 @@ htmlDiv("notification_type",title + htmlHr()) + htmlDiv("created_at",tr("created at :") + dt.toLocalTime().toString()) + statusParser(json["status"].toObject()) + - htmlDiv("reblogger",htmlHr() + - htmlImg("mavatar",json["account"].toObject()["avatar"].toString()) + - tr("%1 (@%2)").arg(json["account"].toObject()["display_name"].toString(), - json["account"].toObject()["acct"].toString()))); + htmlAnc("accounts:" + json["account"].toObject()["id"].toString(), + htmlDiv("reblogger",htmlHr() + + htmlImg("mavatar",json["account"].toObject()["avatar"].toString()) + + tr("%1 (@%2)").arg(json["account"].toObject()["display_name"].toString(), + json["account"].toObject()["acct"].toString()) + ) + ) + ); return result; } @@ -333,6 +342,7 @@ void SaoriView::recived(const QString timeline,const QByteArray data) { if (timeline != m_viewname) return; + qDebug() << "resived " + timeline; QJsonArray json = QJsonDocument::fromJson(data).array(); for (auto j:json) { int i = 0;