描画済エントリも取得した場合は再描画するように修正。不要なら消すべき。
1 parent fab8313 commit 7928c079b0e924d7f4c28a560358b2da50e04906
@TAM (Teppei Tamra) TAM (Teppei Tamra) authored on 23 May 2018
Showing 1 changed file
View
30
saoriview.cpp
entry = new SaoriViewEntry(j.toObject()["id"].toString().toLongLong(),ui->scrollAreaWidgetContents);
connect(entry,&SaoriViewEntry::anchorClicked,this,&SaoriView::linkClicked);
m_entries.insert(i,entry);
qobject_cast<QBoxLayout*>(ui->scrollAreaWidgetContents->layout())->insertWidget(i,entry);
if (m_viewname == "notifications") entry->setContent(notificationParser(j.toObject()));
else if ((m_viewname.split(':')[0] == "accounts") && (m_viewname.split(':')[2] == "followers")) {
entry->setContent(followerParser(j.toObject()));
} else if ((m_viewname.split(':')[0] == "accounts") && (m_viewname.split(':')[2] == "following")) {
entry->setContent(followerParser(j.toObject()));
} else {
bool cw = !j.toObject()["spoiler_text"].toString().isEmpty();
if (!j.toObject()["reblog"].isNull())
cw = !j.toObject()["reblog"].toObject()["spoiler_text"].toString().isEmpty();
entry->setContent(statusParser(j.toObject()),cw);
}
}
}
 
// NOTE:ここから
if (m_viewname == "notifications") entry->setContent(notificationParser(j.toObject()));
else if ((m_viewname.split(':')[0] == "accounts") && (m_viewname.split(':')[2] == "followers")) {
entry->setContent(followerParser(j.toObject()));
} else if ((m_viewname.split(':')[0] == "accounts") && (m_viewname.split(':')[2] == "following")) {
entry->setContent(followerParser(j.toObject()));
} else {
bool cw = !j.toObject()["spoiler_text"].toString().isEmpty();
if (!j.toObject()["reblog"].isNull())
cw = !j.toObject()["reblog"].toObject()["spoiler_text"].toString().isEmpty();
entry->setContent(statusParser(j.toObject()),cw);
}
// NOTE:ここまでを上ifに含めると取得済みエントリを再描画しなくなる。
}
if (m_entries.count()) {
if (m_entries.first()->id() > m_maxid) reload();
}