This commit is contained in:
Martin Rotter 2016-09-13 08:28:21 +02:00
parent 987583074f
commit 846cd1eac5
3 changed files with 6 additions and 8 deletions

View file

@ -8,6 +8,7 @@ Changed:
▪ Made some tweaks regarding bug #41. Number of new messages is now determined in feed downloader working thread too. ▪ Made some tweaks regarding bug #41. Number of new messages is now determined in feed downloader working thread too.
Fixed: Fixed:
▪ Fixed problem with updating states of messages in Nextcloud. Remove and re-add your account to fix the problem!! (bug #59)
3.3.4 3.3.4
————— —————

View file

@ -149,15 +149,13 @@ QNetworkReply::NetworkError NetworkFactory::downloadIcon(const QList<QString> &u
} }
NetworkResult NetworkFactory::performNetworkOperation(const QString &url, int timeout, const QByteArray &input_data, NetworkResult NetworkFactory::performNetworkOperation(const QString &url, int timeout, const QByteArray &input_data,
const QString &input_content_type, QByteArray &output, const QString &input_content_type, QByteArray &output,
QNetworkAccessManager::Operation operation, bool protected_contents, QNetworkAccessManager::Operation operation, bool protected_contents,
const QString &username, const QString &password, bool set_basic_header) { const QString &username, const QString &password, bool set_basic_header) {
Downloader downloader; Downloader downloader;
QEventLoop loop; QEventLoop loop;
NetworkResult result; NetworkResult result;
QString str(input_data);
downloader.appendRawHeader("Content-Type", input_content_type.toLocal8Bit()); downloader.appendRawHeader("Content-Type", input_content_type.toLocal8Bit());
if (set_basic_header) { if (set_basic_header) {

View file

@ -311,7 +311,6 @@ QNetworkReply::NetworkError OwnCloudNetworkFactory::triggerFeedUpdate(int feed_i
QNetworkReply::NetworkError OwnCloudNetworkFactory::markMessagesRead(RootItem::ReadStatus status, QNetworkReply::NetworkError OwnCloudNetworkFactory::markMessagesRead(RootItem::ReadStatus status,
const QStringList &custom_ids) { const QStringList &custom_ids) {
QList<QVariant> var_ids;
QJsonObject json; QJsonObject json;
QJsonArray ids; QJsonArray ids;
QByteArray raw_output; QByteArray raw_output;
@ -565,7 +564,7 @@ QList<Message> OwnCloudGetMessagesResponse::messages() const {
msg.m_contents = message_map["body"].toString(); msg.m_contents = message_map["body"].toString();
msg.m_created = TextFactory::parseDateTime(message_map["pubDate"].toDouble() * 1000); msg.m_created = TextFactory::parseDateTime(message_map["pubDate"].toDouble() * 1000);
msg.m_createdFromFeed = true; msg.m_createdFromFeed = true;
msg.m_customId = message_map["id"].toString(); msg.m_customId = QString::number(message_map["id"].toInt());
msg.m_customHash = message_map["guidHash"].toString(); msg.m_customHash = message_map["guidHash"].toString();
QString enclosure_link = message_map["enclosureLink"].toString(); QString enclosure_link = message_map["enclosureLink"].toString();
@ -579,7 +578,7 @@ QList<Message> OwnCloudGetMessagesResponse::messages() const {
msg.m_enclosures.append(enclosure); msg.m_enclosures.append(enclosure);
} }
msg.m_feedId = message_map["feedId"].toString(); msg.m_feedId = QString::number(message_map["feedId"].toInt());
msg.m_isImportant = message_map["starred"].toBool(); msg.m_isImportant = message_map["starred"].toBool();
msg.m_isRead = !message_map["unread"].toBool(); msg.m_isRead = !message_map["unread"].toBool();
msg.m_title = message_map["title"].toString(); msg.m_title = message_map["title"].toString();