Do not add EasyList by default.

This commit is contained in:
Martin Rotter 2017-07-20 12:42:32 +02:00
parent 15e83ebd8f
commit f1769d8b3c
2 changed files with 2 additions and 11 deletions

View File

@ -26,6 +26,7 @@
#define ARGUMENTS_LIST_SEPARATOR "\n"
#define ADBLOCK_UPDATE_DAYS_INTERVAL 5
#define ADBLOCK_ICON_ACTIVE "adblock"
#define ADBLOCK_ICON_DISABLED "adblock-disabled"
#define IS_IN_ARRAY(offset, array) ((offset >= 0) && (offset < array.count()))

View File

@ -284,16 +284,6 @@ void AdBlockManager::load() {
m_subscriptions.append(subscription);
}
// Prepend EasyList if subscriptions are empty.
if (m_subscriptions.isEmpty()) {
AdBlockSubscription* easyList = new AdBlockSubscription(tr("EasyList"), this);
easyList->setUrl(QUrl(ADBLOCK_EASYLIST_URL));
easyList->setFilePath(storedListsPath() + QDir::separator() + QSL("easylist.txt"));
m_subscriptions.prepend(easyList);
}
// Append CustomList.
AdBlockCustomList *customList = new AdBlockCustomList(this);
m_subscriptions.append(customList);
@ -308,7 +298,7 @@ void AdBlockManager::load() {
connect(subscription, SIGNAL(subscriptionChanged()), this, SLOT(updateMatcher()));
}
if (lastUpdate.addDays(5) < QDateTime::currentDateTime()) {
if (lastUpdate.addDays(ADBLOCK_UPDATE_DAYS_INTERVAL) < QDateTime::currentDateTime()) {
QTimer::singleShot(1000 * 60, this, SLOT(updateAllSubscriptions()));
}