Fix 'Allow Once' feed update after it was broken by refactoring

This commit is contained in:
Bart De Vries 2021-10-02 20:32:36 +02:00
parent c061a01c59
commit 157e1219bb
2 changed files with 2 additions and 2 deletions

View File

@ -35,12 +35,14 @@ void FetchFeedsJob::start()
void FetchFeedsJob::fetch() void FetchFeedsJob::fetch()
{ {
/* We remove this because otherwise 'Allow Once' would not work ...
if (Fetcher::instance().isMeteredConnection() && !SettingsManager::self()->allowMeteredFeedUpdates()) { if (Fetcher::instance().isMeteredConnection() && !SettingsManager::self()->allowMeteredFeedUpdates()) {
setError(0); setError(0);
setErrorText(i18n("Podcast updates not allowed due to user setting")); setErrorText(i18n("Podcast updates not allowed due to user setting"));
emitResult(); emitResult();
return; return;
} }
*/
setTotalAmount(KJob::Unit::Items, m_urls.count()); setTotalAmount(KJob::Unit::Items, m_urls.count());
setProcessedAmount(KJob::Unit::Items, 0); setProcessedAmount(KJob::Unit::Items, 0);

View File

@ -30,9 +30,7 @@ Kirigami.OverlaySheet {
// This function will be executed when the "Allow once" action is chosen; can be overloaded // This function will be executed when the "Allow once" action is chosen; can be overloaded
function allowOnceAction() { function allowOnceAction() {
SettingsManager.allowMeteredFeedUpdates = true;
action() action()
SettingsManager.allowMeteredFeedUpdates = false;
} }
// This function will be executed when the "Always allow" action is chosed; can be overloaded // This function will be executed when the "Always allow" action is chosed; can be overloaded