Limit similar ops to chunk size

This commit is contained in:
M66B 2022-01-29 08:49:48 +01:00
parent e9788f811c
commit 2f24588f57
1 changed files with 6 additions and 0 deletions

View File

@ -190,6 +190,9 @@ class Core {
Store istore = iservice.getStore();
DB db = DB.getInstance(context);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNK_SIZE);
NotificationManager nm =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
@ -315,6 +318,9 @@ class Core {
}
break;
}
if (similar.size() >= chunk_size)
break;
}
if (skip) {