From 577ae2b889f803d47530881ef1127647f3a8887b Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Fri, 12 Feb 2021 09:34:58 +0100 Subject: [PATCH] Fix showing results screen --- src/main.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6bc4afd..97056b7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -121,6 +121,15 @@ struct Statistics { sorting_fixed: usize, } +impl Statistics { + fn anything_fixed(&self) -> bool { + &self.authors_fixed > &0 + || &self.genres_fixed > &0 + || &self.ghost_books_cleaned > &0 + || &self.sorting_fixed > &0 + } +} + fn fix_db_entries(tx: &Transaction, book_entries: &Vec) -> Statistics { let mut stat = Statistics { authors_fixed: 0, @@ -254,7 +263,7 @@ fn main() { tx.commit().unwrap(); if cfg!(target_arch = "arm") { - if stat.authors_fixed == 0 { + if stat.anything_fixed() == false { if stat.drm_skipped == 0 { pocketbook::dialog( pocketbook::Icon::Info,