Add reedah icon, fix pw not saving, fix repeated tokens downloading.

This commit is contained in:
Martin Rotter 2021-03-20 20:37:25 +01:00 committed by Martin Rotter
parent 0b5d2d16c6
commit a02ff587f6
4 changed files with 11 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -24,6 +24,7 @@
<file>graphics/misc/image-placeholder.png</file>
<file>graphics/misc/inoreader.png</file>
<file>graphics/misc/nextcloud.png</file>
<file>graphics/misc/reedah.png</file>
<file>graphics/misc/theoldreader.png</file>
<file>graphics/misc/tt-rss.png</file>

View File

@ -464,7 +464,7 @@ QPair<QByteArray, QByteArray> GreaderNetwork::authHeader() const {
}
bool GreaderNetwork::ensureLogin(const QNetworkProxy& proxy, QNetworkReply::NetworkError* output) {
if (m_authSid.isEmpty()) {
if (m_authSid.isEmpty() && m_authAuth.isEmpty()) {
auto login = clientLogin(proxy);
if (output != nullptr) {
@ -477,6 +477,9 @@ bool GreaderNetwork::ensureLogin(const QNetworkProxy& proxy, QNetworkReply::Netw
<< QUOTE_W_SPACE_DOT(NetworkFactory::networkErrorText(login));
return false;
}
else {
qDebugNN << LOGSEC_GREADER << "Login successful.";
}
}
return true;

View File

@ -2,9 +2,9 @@
#include "services/greader/greaderserviceroot.h"
#include "database/databasequeries.h"
#include "definitions/definitions.h"
#include "miscellaneous/application.h"
#include "database/databasequeries.h"
#include "miscellaneous/iconfactory.h"
#include "miscellaneous/mutex.h"
#include "miscellaneous/textfactory.h"
@ -49,7 +49,7 @@ QVariantHash GreaderServiceRoot::customDatabaseData() const {
void GreaderServiceRoot::setCustomDatabaseData(const QVariantHash& data) {
m_network->setService(GreaderServiceRoot::Service(data["service"].toInt()));
m_network->setUsername(data["username"].toString());
TextFactory::decrypt(data["password"].toString());
m_network->setPassword(TextFactory::decrypt(data["password"].toString()));
m_network->setBaseUrl(data["url"].toString());
m_network->setBatchSize(data["batch_size"].toInt());
}
@ -185,6 +185,10 @@ void GreaderServiceRoot::updateTitleIcon() {
setIcon(qApp->icons()->miscIcon(QSL("bazqux")));
break;
case Service::Reedah:
setIcon(qApp->icons()->miscIcon(QSL("reedah")));
break;
default:
setIcon(GreaderEntryPoint().icon());
break;