From bd5c4d48f980d2d3dcc1112fe499dba17ef8e507 Mon Sep 17 00:00:00 2001 From: Constantin Piber <59023762+cpiber@users.noreply.github.com> Date: Wed, 7 Jan 2026 09:36:37 +0100 Subject: [PATCH] Add a small increment to chapter number before comparison to fix progress sync issues for Suwayomi (#2675) Due to a `Float->Double->Float` conversion somewhere inside Mihon, the tracker sees 2.1 as 2.0999999046325684, which means this filter ignores the 2.1 chapter (which we just tried to mark as read). This small epsilon is small enough to never bother any serious usage, but large enough to ignore any such conversion errors. Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> --- CHANGELOG.md | 1 + .../java/eu/kanade/tachiyomi/data/track/suwayomi/SuwayomiApi.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c19a48925..f827195fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co ### Changed - Update tracker icons ([@AntsyLich](https://github.com/AntsyLich)) ([#2773](https://github.com/mihonapp/mihon/pull/2773)) +- Add a small increment to chapter number before comparison to fix progress sync issues for Suwayomi ([@cpiber](https://github.com/cpiber)) ([#2657](https://github.com/mihonapp/mihon/pull/2675)) ### Fixed - Fix reader tap zones triggering after scrolling is stopped by tapping ([@NGB-Was-Taken](https://github.com/NGB-Was-Taken)) ([#2680](https://github.com/mihonapp/mihon/pull/2680)) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/SuwayomiApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/SuwayomiApi.kt index 47e463405..9933ab43f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/SuwayomiApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/suwayomi/SuwayomiApi.kt @@ -118,7 +118,7 @@ class SuwayomiApi(private val trackId: Long) { .data .entry .nodes - .mapNotNull { n -> n.id.takeIf { n.chapterNumber <= track.last_chapter_read } } + .mapNotNull { n -> n.id.takeIf { n.chapterNumber <= track.last_chapter_read + 0.001 } } } val markQuery = if (deleteDownloadsOnServer) {