mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2025-12-08 19:05:54 +00:00
add issue template only when no description provided
This commit is contained in:
parent
f62d6d8cde
commit
7ee56dbe87
@ -54,16 +54,19 @@ class EditIssuePrFragment : BaseFragment() {
|
||||
toolbar.inflateMenu(R.menu.submit_menu)
|
||||
toolbar.setNavigationOnClickListener { activity?.onBackPressed() }
|
||||
|
||||
viewModel.templateLiveData.observeNotNull(this) {
|
||||
if (model.description.isNullOrEmpty()) {
|
||||
model.description = it
|
||||
descriptionEditText.post { markwon.setMarkdown(descriptionEditText, it) }
|
||||
}
|
||||
}
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
titleEditText.setText(model.title)
|
||||
val description = model.description
|
||||
if (!description.isNullOrEmpty()) {
|
||||
descriptionEditText.post { markwon.setMarkdown(descriptionEditText, description) }
|
||||
} else {
|
||||
viewModel.templateLiveData.observeNotNull(this) {
|
||||
model.description = it
|
||||
descriptionEditText.post { markwon.setMarkdown(descriptionEditText, it) }
|
||||
}
|
||||
viewModel.loadTemplate(model.login, model.repo)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user