From 0a878a7ca8a938fd2ce3f6e71ddb4844c9fe508d Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 6 Sep 2024 05:35:27 +0300 Subject: [PATCH] fix progress function --- src/app/browser/main/tab/page/navigation/request.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/browser/main/tab/page/navigation/request.cpp b/src/app/browser/main/tab/page/navigation/request.cpp index ee4d16d1..483d607d 100644 --- a/src/app/browser/main/tab/page/navigation/request.cpp +++ b/src/app/browser/main/tab/page/navigation/request.cpp @@ -65,18 +65,22 @@ void Request::refresh( { double current_progress_fraction = get_progress_fraction(); + // Animation in progress if (current_progress_fraction < progress_fraction) { set_progress_fraction( current_progress_fraction + PROGRESS_PULSE_STEP ); - return false; + return true; // continue } - return true; // 100% of value + // 100% of value, reset + set_progress_fraction( + progress_fraction = 0 + ); - //return current_progress_fraction < 1; // until 100% of value + return false; // stop }, PROGRESS_ANIMATION_TIME );