Review comments
This commit is contained in:
@@ -1001,6 +1001,8 @@ void MdReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION ac
|
|||||||
SETTINGS.orientation = nextOrientation;
|
SETTINGS.orientation = nextOrientation;
|
||||||
SETTINGS.saveToFile();
|
SETTINGS.saveToFile();
|
||||||
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
|
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
|
||||||
|
initialized = false;
|
||||||
|
initializeReader();
|
||||||
requestUpdate();
|
requestUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -839,6 +839,8 @@ void TxtReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
|
|||||||
SETTINGS.orientation = nextOrientation;
|
SETTINGS.orientation = nextOrientation;
|
||||||
SETTINGS.saveToFile();
|
SETTINGS.saveToFile();
|
||||||
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
|
ReaderUtils::applyOrientation(renderer, SETTINGS.orientation);
|
||||||
|
initialized = false;
|
||||||
|
initializeReader();
|
||||||
requestUpdate();
|
requestUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,9 +82,7 @@ bool HttpDownloader::fetchUrl(const std::string& url, Stream& outContent, const
|
|||||||
if (httpCode != HTTP_CODE_OK) {
|
if (httpCode != HTTP_CODE_OK) {
|
||||||
LOG_ERR("HTTP", "Fetch failed: %d", httpCode);
|
LOG_ERR("HTTP", "Fetch failed: %d", httpCode);
|
||||||
http.end();
|
http.end();
|
||||||
if (client) {
|
client->stop();
|
||||||
client->stop();
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,9 +140,7 @@ HttpDownloader::DownloadError HttpDownloader::downloadToFile(const std::string&
|
|||||||
if (httpCode != HTTP_CODE_OK) {
|
if (httpCode != HTTP_CODE_OK) {
|
||||||
LOG_ERR("HTTP", "Download failed: %d", httpCode);
|
LOG_ERR("HTTP", "Download failed: %d", httpCode);
|
||||||
http.end();
|
http.end();
|
||||||
if (client) {
|
client->stop();
|
||||||
client->stop();
|
|
||||||
}
|
|
||||||
return HTTP_ERROR;
|
return HTTP_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,9 +217,7 @@ HttpDownloader::DownloadError HttpDownloader::downloadToFile(const std::string&
|
|||||||
file.flush();
|
file.flush();
|
||||||
file.close();
|
file.close();
|
||||||
http.end();
|
http.end();
|
||||||
if (client) {
|
client->stop();
|
||||||
client->stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (writeResult < 0) {
|
if (writeResult < 0) {
|
||||||
LOG_ERR("HTTP", "writeToStream error: %d", writeResult);
|
LOG_ERR("HTTP", "writeToStream error: %d", writeResult);
|
||||||
|
|||||||
Reference in New Issue
Block a user