Index: libadblockplus-android/jni/JniFilterEngine.cpp |
diff --git a/libadblockplus-android/jni/JniFilterEngine.cpp b/libadblockplus-android/jni/JniFilterEngine.cpp |
index 1f59aac630f338d3a92483dddde2b57cc2018b3f..b8517acdb08e3f3fed9f9f4454439dc9b4b6fb52 100644 |
--- a/libadblockplus-android/jni/JniFilterEngine.cpp |
+++ b/libadblockplus-android/jni/JniFilterEngine.cpp |
@@ -485,7 +485,7 @@ static void JNICALL JniUpdateFiltersAsync(JNIEnv* env, jclass clazz, jlong jniPl |
{ |
std::string subscriptionUrl = JniJavaToStdString(env, jSubscriptionUrl); |
auto jniPlatform = JniLongToTypePtr<JniPlatform>(jniPlatformPtr); |
- jniPlatform->scheduler([jniPlatform, subscriptionUrl] |
+ auto updateSubscriptionFilters = [jniPlatform, subscriptionUrl] |
{ |
auto& filterEngine = jniPlatform->platform->GetFilterEngine(); |
for (auto& subscription : filterEngine.GetListedSubscriptions()) |
@@ -496,6 +496,10 @@ static void JNICALL JniUpdateFiltersAsync(JNIEnv* env, jclass clazz, jlong jniPl |
return; |
} |
} |
+ }; |
+ jniPlatform->platform->WithTimer([updateSubscriptionFilters](AdblockPlus::ITimer& timer) |
+ { |
+ timer.SetTimer(std::chrono::milliseconds(300), updateSubscriptionFilters); |
anton
2017/10/06 10:38:08
I don't like such timers a lot. It's always introd
sergei
2017/10/06 13:37:03
As discussed in the issue, it does not help.
|
}); |
} |