From 32223620fc202796b15bb9a5de9a464b08f13643 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 2 Dec 2019 20:33:19 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/widget/BadgeView.kt | 6 +++--- app/src/main/res/layout/item_bookshelf_grid.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/BadgeView.kt b/app/src/main/java/io/legado/app/ui/widget/BadgeView.kt index c6c14cee5..d9d5e1ee8 100644 --- a/app/src/main/java/io/legado/app/ui/widget/BadgeView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/BadgeView.kt @@ -43,10 +43,10 @@ class BadgeView @JvmOverloads constructor( return null } val text = text.toString() - try { - return Integer.parseInt(text) + return try { + Integer.parseInt(text) } catch (e: NumberFormatException) { - return null + null } } diff --git a/app/src/main/res/layout/item_bookshelf_grid.xml b/app/src/main/res/layout/item_bookshelf_grid.xml index dbfe2717b..0160a1896 100644 --- a/app/src/main/res/layout/item_bookshelf_grid.xml +++ b/app/src/main/res/layout/item_bookshelf_grid.xml @@ -12,7 +12,7 @@