Commit 60280042 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Don't show the subtitle in dns rules when they are disabled

parent f3ddc71b
......@@ -520,8 +520,10 @@ class DnsRuleFragment : Fragment() {
}
private fun updateRuleCountTitle() {
activity?.runOnUiThread {
(activity as AppCompatActivity?)?.supportActionBar?.subtitle = resources.getQuantityString(R.plurals.window_dnsrules_subtitle, totalRuleCount!!.toInt(), totalRuleCount)
activity?.runOnUiThread {
(activity as AppCompatActivity?)?.supportActionBar?.subtitle = if(getPreferences().dnsRulesEnabled) {
resources.getQuantityString(R.plurals.window_dnsrules_subtitle, totalRuleCount!!.toInt(), totalRuleCount)
} else null
}
}
......@@ -543,6 +545,7 @@ class DnsRuleFragment : Fragment() {
getPreferences().dnsRulesEnabled = isChecked
overlay.visibility = if(isChecked) View.GONE else View.VISIBLE
search.isEnabled = isChecked
updateRuleCountTitle()
}
search?.setOnMenuItemClickListener {
DnsRuleSearchDialog(requireContext()).show()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment