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

Number might be null here

parent 421b1fcc
......@@ -524,7 +524,7 @@ class DnsRuleFragment : Fragment() {
private fun updateRuleCountTitle() {
activity?.runOnUiThread {
(activity as AppCompatActivity?)?.supportActionBar?.subtitle = if(getPreferences().dnsRulesEnabled) {
val formattedString = getPreferences().numberFormatter.format(totalRuleCount)
val formattedString = getPreferences().numberFormatter.format(totalRuleCount ?: 0)
resources.getQuantityString(R.plurals.window_dnsrules_subtitle, totalRuleCount!!.toInt(), formattedString)
} else null
}
......
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