Skip to content

Commit

Permalink
Tanoshi-web: Deselect option non >1 instead of all
Browse files Browse the repository at this point in the history
Signed-off-by: Luigi311 <[email protected]>
  • Loading branch information
luigi311 committed Sep 10, 2023
1 parent 0ccd5f2 commit 3147fc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/tanoshi-web/src/manga.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand 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
Expand Down

0 comments on commit 3147fc7

Please sign in to comment.