From f508d10ad13560d7316df8642bc93fe66c05b9a8 Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:08:11 +0600 Subject: [PATCH] Fix a rare crash when invoking "Mark previous as read" action Closes #1421 --- CHANGELOG.md | 1 + .../main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf41c076e..0f0288246 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co ### Fixed - Fixed "currentTab was used multiple times" +- Fixed a rare crash when invoking "Mark previous as read" action ### Improved - Bangumi search now shows the score and summary of a search result ([@MajorTanya](https://github.com/MajorTanya)) ([#1396](https://github.com/mihonapp/mihon/pull/1396)) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt index f05d71392..53665552d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt @@ -730,6 +730,7 @@ class MangaScreenModel( */ fun markChaptersRead(chapters: List, read: Boolean) { toggleAllSelection(false) + if (chapters.isEmpty()) return screenModelScope.launchIO { setReadStatus.await( read = read,