From 78fd09c7286cfbd0db9dd308ebbb41e6e7fbe7c5 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sun, 23 Mar 2025 03:50:25 +0100 Subject: [PATCH] Prevent IndexOutOfBoundsException in "libraryUpdate" subscription (#1320) --- .../tachidesk/graphql/subscriptions/UpdateSubscription.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/graphql/subscriptions/UpdateSubscription.kt b/server/src/main/kotlin/suwayomi/tachidesk/graphql/subscriptions/UpdateSubscription.kt index 060aa53f..a29d08b0 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/graphql/subscriptions/UpdateSubscription.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/graphql/subscriptions/UpdateSubscription.kt @@ -59,8 +59,8 @@ class UpdateSubscription { UpdaterUpdates( UpdateUpdates( updates.isRunning, - updates.categoryUpdates.subList(0, maxUpdates), - updates.mangaUpdates.subList(0, maxUpdatesAfterCategoryUpdates), + updates.categoryUpdates.take(maxUpdates), + updates.mangaUpdates.take(maxUpdatesAfterCategoryUpdates), updates.totalJobs, updates.finishedJobs, updates.skippedCategoriesCount,