Refresh post when repost (or remove repost) is performed, issue #57

This commit is contained in:
Morgan McMillian 2020-02-05 22:01:49 -08:00
parent 14e536947b
commit bd441eac0e

View file

@ -305,6 +305,12 @@ void Pnut::onAuthorizedRequestReady(QByteArray data, int id)
req_map.remove(id);
getPost(variant.toMap()["data"].toMap()["id"].toString());
}
else if (endpoint.startsWith(":repost"))
{
qDebug() << "Repost successful!";
req_map.remove(id);
getPost(variant.toMap()["data"].toMap()["id"].toString());
}
else
{
qDebug() << "GOT SOMETHING NEW!";
@ -319,6 +325,12 @@ void Pnut::onAuthorizedRequestReady(QByteArray data, int id)
qDebug() << "Create post success!";
req_map.remove(id);
}
else if (endpoint.startsWith(":repost"))
{
qDebug() << "Repost successful!";
req_map.remove(id);
getPost(variant.toMap()["data"].toMap()["id"].toString());
}
else
{
qDebug() << "Good but not sure what";