Refresh post when repost (or remove repost) is performed, issue #57
This commit is contained in:
parent
14e536947b
commit
bd441eac0e
1 changed files with 12 additions and 0 deletions
12
src/Pnut.cpp
12
src/Pnut.cpp
|
@ -305,6 +305,12 @@ void Pnut::onAuthorizedRequestReady(QByteArray data, int id)
|
||||||
req_map.remove(id);
|
req_map.remove(id);
|
||||||
getPost(variant.toMap()["data"].toMap()["id"].toString());
|
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
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "GOT SOMETHING NEW!";
|
qDebug() << "GOT SOMETHING NEW!";
|
||||||
|
@ -319,6 +325,12 @@ void Pnut::onAuthorizedRequestReady(QByteArray data, int id)
|
||||||
qDebug() << "Create post success!";
|
qDebug() << "Create post success!";
|
||||||
req_map.remove(id);
|
req_map.remove(id);
|
||||||
}
|
}
|
||||||
|
else if (endpoint.startsWith(":repost"))
|
||||||
|
{
|
||||||
|
qDebug() << "Repost successful!";
|
||||||
|
req_map.remove(id);
|
||||||
|
getPost(variant.toMap()["data"].toMap()["id"].toString());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug() << "Good but not sure what";
|
qDebug() << "Good but not sure what";
|
||||||
|
|
Reference in a new issue