From 3147fc7f8bfeed6305613f67f83bb764cec8ad16 Mon Sep 17 00:00:00 2001 From: Luigi311 Date: Sun, 10 Sep 2023 02:34:29 -0600 Subject: [PATCH] Tanoshi-web: Deselect option non >1 instead of all Signed-off-by: Luigi311 --- crates/tanoshi-web/src/manga.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/tanoshi-web/src/manga.rs b/crates/tanoshi-web/src/manga.rs index b851753f..0c97c7f3 100644 --- a/crates/tanoshi-web/src/manga.rs +++ b/crates/tanoshi-web/src/manga.rs @@ -380,7 +380,7 @@ impl Manga { .style("display", "flex") .style("align-items", "center") .text_signal(manga.selected_chapters.signal_vec_keys().len().map(clone!(manga => move |selected_len| { - if selected_len == manga.chapters.lock_mut().len() { + if selected_len > 0 { "Deselect all" } else { "Select all" @@ -389,7 +389,7 @@ impl Manga { .event(clone!(manga => move |_: events::Click| { let chapters = manga.chapters.lock_ref(); let mut selected_chapters = manga.selected_chapters.lock_mut(); - if selected_chapters.len() == chapters.len() { + if selected_chapters.len() > 0 { selected_chapters.clear(); } else { // Only select visible chapters