Commit 3446789b authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Ignore case when substituting

parent b7dcbc21
......@@ -173,7 +173,7 @@ class QueryLogDetailFragment : Fragment() {
private fun showRuleSource(query:DnsQuery) {
hostSourceFetchJob = GlobalScope.launch(Dispatchers.IO) {
val sourceRule = if(query.name.startsWith("www", ignoreCase = true)) {
getDatabase().dnsRuleDao().findRuleTargetEntity(query.name.replaceFirst("www.", ""), query.type, true)
getDatabase().dnsRuleDao().findRuleTargetEntity(query.name.replaceFirst("www.", "", ignoreCase = true), query.type, true)
?: getDatabase().dnsRuleDao().findRuleTargetEntity(query.name, query.type, true)
} else {
getDatabase().dnsRuleDao().findRuleTargetEntity(query.name, query.type, true)
......
Supports Markdown
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