|
|
|
@ -37,13 +37,12 @@ class ChangeSourceDialog : BaseDialogFragment(), |
|
|
|
|
const val tag = "changeSourceDialog" |
|
|
|
|
|
|
|
|
|
fun show(manager: FragmentManager, name: String, author: String) { |
|
|
|
|
val fragment = (manager.findFragmentByTag(tag) as? ChangeSourceDialog) |
|
|
|
|
?: ChangeSourceDialog().apply { |
|
|
|
|
val bundle = Bundle() |
|
|
|
|
bundle.putString("name", name) |
|
|
|
|
bundle.putString("author", author) |
|
|
|
|
arguments = bundle |
|
|
|
|
} |
|
|
|
|
val fragment = ChangeSourceDialog().apply { |
|
|
|
|
val bundle = Bundle() |
|
|
|
|
bundle.putString("name", name) |
|
|
|
|
bundle.putString("author", author) |
|
|
|
|
arguments = bundle |
|
|
|
|
} |
|
|
|
|
fragment.show(manager, tag) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|