From 055b6d9e55c2468e6351865f6d6b7a8cf9c1c572 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 15 Aug 2019 09:53:41 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt | 4 ++-- .../java/io/legado/app/ui/changesource/ChangeSourceDialog.kt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt index eb59a6dce..93866c856 100644 --- a/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt +++ b/app/src/main/java/io/legado/app/ui/bookinfo/BookInfoActivity.kt @@ -30,7 +30,7 @@ class BookInfoActivity : VMBaseActivity(R.layout.activity_boo viewModel.loadBook(intent) initView() savedInstanceState?.let { - changeSourceDialog = supportFragmentManager.findFragmentByTag("changeSourceDialog") as? ChangeSourceDialog + changeSourceDialog = supportFragmentManager.findFragmentByTag(ChangeSourceDialog.tag) as? ChangeSourceDialog changeSourceDialog?.callBack = this } } @@ -128,7 +128,7 @@ class BookInfoActivity : VMBaseActivity(R.layout.activity_boo changeSourceDialog?.callBack = this } } - changeSourceDialog?.show(supportFragmentManager, "changeSource") + changeSourceDialog?.show(supportFragmentManager, ChangeSourceDialog.tag) } } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt index e563be35f..d81562bf8 100644 --- a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt @@ -16,6 +16,8 @@ import kotlinx.android.synthetic.main.dialog_change_source.* class ChangeSourceDialog : DialogFragment() { companion object { + const val tag = "changeSourceDialog" + fun newInstance(name: String, author: String): ChangeSourceDialog { val changeSourceDialog = ChangeSourceDialog() val bundle = Bundle()