From 7e65dceb53d0ec76978a4d92bc5a7c624fc9661b Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 14 Nov 2019 11:05:47 +0800 Subject: [PATCH] up --- .../app/ui/book/source/manage/BookSourceActivity.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt index 2a8847f3d..6bfd7b679 100644 --- a/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt @@ -106,7 +106,7 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity intent.data?.let { when (it.path) { "/importonline" -> it.getQueryParameter("src")?.let { url -> - Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE) + Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE).show() viewModel.importSource(url) { msg -> title_bar.snackbar(msg) } @@ -201,7 +201,7 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity cacheUrls.add(0, it) aCache.put("sourceUrl", cacheUrls.joinToString(",")) } - Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE) + Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE).show() viewModel.importSource(it) { msg -> title_bar.snackbar(msg) } @@ -235,7 +235,7 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity override fun onFilePicked(requestCode: Int, currentPath: String) { if (requestCode == importSource) { - Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE) + Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE).show() viewModel.importSourceFromFilePath(currentPath) { msg -> title_bar.snackbar(msg) } @@ -278,7 +278,7 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity when (requestCode) { qrRequestCode -> if (resultCode == RESULT_OK) { data?.getStringExtra("result")?.let { - Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE) + Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE).show() viewModel.importSource(it) { msg -> title_bar.snackbar(msg) } @@ -289,6 +289,7 @@ class BookSourceActivity : VMBaseActivity(R.layout.activity val path = FileUtils.getPath(this, it) if (path != null) { Snackbar.make(title_bar, R.string.importing, Snackbar.LENGTH_INDEFINITE) + .show() viewModel.importSourceFromFilePath(path) { msg -> title_bar.snackbar(msg) }