Skip to content

Commit 26312e2

Browse files
committed
Merge branch 'release/5.19.1'
2 parents 7f7133d + 92a3ff0 commit 26312e2

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

app/src/main/java/com/duckduckgo/app/privacy/model/Grade.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class Grade {
3333
D,
3434
@Json(name = "D-")
3535
D_MINUS
36-
3736
}
3837

3938

@@ -56,8 +55,8 @@ class Grade {
5655

5756
val scores: Grade.Scores get() = calculate()
5857

59-
private var entitiesNotBlocked: MutableMap<String, Double> = mutableMapOf()
60-
private var entitiesBlocked: MutableMap<String, Double> = mutableMapOf()
58+
private var entitiesNotBlocked: Map<String, Double> = mapOf()
59+
private var entitiesBlocked: Map<String, Double> = mapOf()
6160

6261
private fun calculate(): Grade.Scores {
6362

@@ -155,19 +154,17 @@ class Grade {
155154

156155
fun addEntityNotBlocked(entity: String, prevalence: Double?) {
157156
prevalence ?: return
158-
entitiesNotBlocked[entity] = prevalence
157+
entitiesNotBlocked = entitiesNotBlocked.plus(Pair(entity, prevalence))
159158
}
160159

161160
fun addEntityBlocked(entity: String, prevalence: Double?) {
162161
prevalence ?: return
163-
entitiesBlocked[entity] = prevalence
162+
entitiesBlocked = entitiesBlocked.plus(Pair(entity, prevalence))
164163
}
165164

166165
companion object {
167-
168166
const val UNKNOWN_PRIVACY_SCORE = 2
169167
const val MAX_PRIVACY_SCORE = 10
170-
171168
}
172169

173170
}

app/src/main/java/com/duckduckgo/app/trackerdetection/DisconnectClient.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ class DisconnectClient(override val name: Client.ClientName, private val tracker
2424

2525
override fun matches(url: String, documentUrl: String, resourceType: ResourceType): Boolean {
2626
return trackers
27-
.filter { bannedCategories().contains(it.category) }
27+
.filter { bannedCategories.contains(it.category) }
2828
.any { sameOrSubdomain(url, it.url) }
2929
}
3030

31-
private fun bannedCategories(): List<String> = listOf("Analytics", "Advertising", "Social")
31+
companion object {
32+
private val bannedCategories = listOf("Analytics", "Advertising", "Social")
33+
}
3234

3335
}

app/version/release-notes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## What's new in this release?
2-
In this release, we added a notification to let new users know that they can automatically clear their data. We also squashed some bugs and cleaned up potential performance issues.
2+
In this release, we fixed a potential crash when loading a new page and a small performance issue.
33

44
## Have feedback?
55
You can always reach us at https://duckduckgo.com/feedback.

app/version/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515
#
1616

17-
VERSION=5.19.0
17+
VERSION=5.19.1

0 commit comments

Comments
 (0)