From 2ee5d9ceed6fab1c7f3b18f7e04aae1791db1613 Mon Sep 17 00:00:00 2001 From: Burning_TNT <88144530+burningtnt@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:35:00 +0800 Subject: [PATCH] Fix #2831. (#2857) --- .../java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java index 0f300cae1..32e05cd7c 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java @@ -413,7 +413,7 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP searchAction.handle(event); }); lastPageButton.setDisable(true); - control.pageCount.addListener((observable, oldValue, newValue) -> lastPageButton.setDisable(control.pageCount.get() == -1)); + control.pageCount.addListener((observable, oldValue, newValue) -> lastPageButton.setDisable(control.pageCount.get() == -1 || control.pageOffset.get() >= control.pageCount.get() - 1)); Pane placeholder = new Pane(); HBox.setHgrow(placeholder, Priority.SOMETIMES);