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 @@