From e30fdbbe9fb258e81da7cdb90bf9d4da7ee4a8c4 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 29 Feb 2020 20:44:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/filechooser/FilePicker.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/filechooser/FilePicker.kt b/app/src/main/java/io/legado/app/ui/filechooser/FilePicker.kt index 772add3e0..affb430ad 100644 --- a/app/src/main/java/io/legado/app/ui/filechooser/FilePicker.kt +++ b/app/src/main/java/io/legado/app/ui/filechooser/FilePicker.kt @@ -21,7 +21,7 @@ object FilePicker { selectList.removeAt(0) } items(selectList) { _, index -> - when (if (default == null) index - 1 else index) { + when (if (default == null) index + 1 else index) { 0 -> default?.invoke() 1 -> { try { @@ -60,7 +60,7 @@ object FilePicker { selectList.removeAt(0) } items(selectList) { _, index -> - when (if (default == null) index - 1 else index) { + when (if (default == null) index + 1 else index) { 0 -> default?.invoke() 1 -> { try { @@ -104,7 +104,7 @@ object FilePicker { selectList.removeAt(0) } items(selectList) { _, index -> - when (if (default == null) index - 1 else index) { + when (if (default == null) index + 1 else index) { 0 -> default?.invoke() 1 -> { try { @@ -152,7 +152,7 @@ object FilePicker { selectList.removeAt(0) } items(selectList) { _, index -> - when (if (default == null) index - 1 else index) { + when (if (default == null) index + 1 else index) { 0 -> default?.invoke() 1 -> { try {