This commit is contained in:
C10udburst 2022-08-19 13:12:57 +02:00
parent d1a69088f3
commit 88a7b8751b

View file

@ -54,8 +54,8 @@ class NginxSettingsFragment(private val plugin: Plugin, val nginxApi: NginxApi)
val infoSubTextView = view.findView<TextView>("info_sub_text") val infoSubTextView = view.findView<TextView>("info_sub_text")
val infoImageView = view.findView<ImageView>("nginx_info_imageview") val infoImageView = view.findView<ImageView>("nginx_info_imageview")
infoTextView.text = getString("nginx_info_title") infoTextView.text = getString("nginx_info_title") ?: "Nginx"
infoSubTextView.text = getString("nginx_info_summary") infoSubTextView.text = getString("nginx_info_summary") ?: ""
infoImageView.setImageDrawable(getDrawable("nginx_question")) infoImageView.setImageDrawable(getDrawable("nginx_question"))
infoImageView.imageTintList = infoImageView.imageTintList =
ColorStateList.valueOf(view.context.colorFromAttribute(R.attr.white)) ColorStateList.valueOf(view.context.colorFromAttribute(R.attr.white))
@ -75,7 +75,7 @@ class NginxSettingsFragment(private val plugin: Plugin, val nginxApi: NginxApi)
}) })
loginTextView.text = getString("login_format").format(nginxApi.name, getString("account")) loginTextView.text = view.context.resources.getString(R.string.login_format).format(nginxApi.name, getString("account"))
loginView.setOnClickListener(object : View.OnClickListener { loginView.setOnClickListener(object : View.OnClickListener {
override fun onClick(v: View?) { override fun onClick(v: View?) {
val info = nginxApi.loginInfo() val info = nginxApi.loginInfo()